Skip to content

Commit 5fd6a3c

Browse files
committed
ci: release pdf following semantic versioning
1 parent 2430423 commit 5fd6a3c

3 files changed

Lines changed: 106 additions & 13 deletions

File tree

.github/workflows/documentation.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: Documentation
22

33
on:
44
push:
5-
# tags:
6-
# - '*'
75
branches:
86
- master
97
- main
@@ -45,7 +43,7 @@ jobs:
4543
# run: cmake --build build -j4 --config Release
4644

4745
- name: mkdocs
48-
run: ENABLE_PDF_EXPORT=1 mkdocs build
46+
run: ENABLE_PDF_EXPORT=0 mkdocs build
4947

5048
- name: COPY CNAME
5149
run: cp CNAME ./site

.github/workflows/release-pdf.yaml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
# tags:
6+
# - '*'
7+
branches:
8+
- master
9+
- main
10+
env:
11+
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules
12+
13+
jobs:
14+
build:
15+
name: Build and publish documentation
16+
container: emscripten/emsdk
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
with:
21+
fetch-depth: 0
22+
# lfs: true
23+
24+
- uses: actions/cache@v2
25+
with:
26+
path: "**/cpm_modules"
27+
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
28+
29+
- name: APT Update
30+
run: apt update
31+
32+
- name: Install dependencies
33+
run: |
34+
apt install -y doxygen gource libgs-dev
35+
pip3 install jinja2 Pygments mkdocs-material mkdocs mkdocs-same-dir mkdocs-minify-plugin mkdocs-redirects mkdocs-exclude mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin mkdocs-with-pdf
36+
npm install
37+
38+
- name: Configure
39+
run: emcmake cmake -S. -Bbuild -DENABLE_TEST_COVERAGE=OFF -DENABLE_STANDALONE=ON -DENABLE_DOCUMENTATION=ON
40+
41+
# - name: Build Docs
42+
# run: cmake --build build --target GenerateDocs
43+
#
44+
# - name: Build Emscripten
45+
# run: cmake --build build -j4 --config Release
46+
47+
- name: mkdocs
48+
run: ENABLE_PDF_EXPORT=1 mkdocs build
49+
50+
# - name: COPY CNAME
51+
# run: cp CNAME ./site
52+
53+
# - name: Copy Emscripten build to docs
54+
# run: cp -R build/out/* build/documentation/doxygen/html/
55+
56+
# - name: Publish
57+
# uses: peaceiris/actions-gh-pages@v3
58+
# with:
59+
# github_token: ${{ secrets.GITHUB_TOKEN }}
60+
# publish_dir: ./site
61+
62+
- name: Semantic Release
63+
id: semantic
64+
uses: cycjimmy/semantic-release-action@v2
65+
with:
66+
semantic_version: 19.0.2
67+
# You can specify specifying version range for the extra plugins if you prefer.
68+
extra_plugins: |
69+
@semantic-release/changelog@6.0.2
70+
@semantic-release/git@10.0.1
71+
@semantic-release/commit-analyzer@9.0.2
72+
@semantic-release/github@8.0.7
73+
@semantic-release/npm@9.0.1
74+
@semantic-release/release-notes-generator@10.0.3
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
78+
- name: version
79+
id: version
80+
run: |
81+
export commit=`git rev-list --tags --max-count=1`
82+
export last_release_version=`git describe --abbrev=0 --tags $tag`
83+
export new_release_version=v${{ steps.semantic.outputs.new_release_version }}
84+
export version=${new_release_version:-$last_release_version}
85+
echo "version=${version}" >> $GITHUB_OUTPUT
86+
87+
- uses: ncipollo/release-action@v1
88+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' #|| startsWith(github.ref, 'refs/tags')
89+
with:
90+
allowUpdates: true
91+
artifacts: site/document.pdf
92+
tag: ${{ steps.version.outputs.version }}

package.json

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "awesome-programming-course",
33
"version": "0.0.1",
4-
"description": "Modern Cross Platform Job Scheduler and Runner with Job Stealing for Game Engines",
4+
"description": "Awesome GameDev Resources",
55
"main": "placeholder.js",
66
"directories": {
77
"test": "test"
@@ -22,22 +22,24 @@
2222
},
2323
"repository": {
2424
"type": "git",
25-
"url": "git+https://github.com/InfiniBrains/concurrency.git"
25+
"url": "git+https://github.com/InfiniBrains/Awesome-GameDev-Resources.git"
2626
},
2727
"keywords": [
28-
"GameEngine",
29-
"JobStealing",
30-
"TaskScheduler",
28+
"C++",
3129
"CPP",
30+
"Game Patterns",
31+
"Game Programming",
32+
"GameDev",
3233
"WASM",
33-
"EMSCRIPTEN"
34+
"EMSCRIPTEN",
35+
"Game Engine"
3436
],
3537
"author": "InfiniBrains",
3638
"license": "MIT",
3739
"bugs": {
38-
"url": "https://github.com/InfiniBrains/concurrency/issues"
40+
"url": "https://github.com/InfiniBrains/Awesome-GameDev-Resources/issues"
3941
},
40-
"homepage": "https://infinibrains.github.io/concurrency/",
42+
"homepage": "https://infinibrains.github.io/InfiniBrains/Awesome-GameDev-Resources",
4143
"dependencies": {
4244
"@semantic-release/changelog": "^6.0.2",
4345
"@semantic-release/commit-analyzer": "^9.0.2",
@@ -53,7 +55,7 @@
5355
"master",
5456
"main"
5557
],
56-
"repositoryUrl": "https://github.com/InfiniBrains/concurrency",
58+
"repositoryUrl": "https://github.com/InfiniBrains/Awesome-GameDev-Resources",
5759
"plugins": [
5860
"@semantic-release/commit-analyzer",
5961
"@semantic-release/release-notes-generator",
@@ -70,7 +72,8 @@
7072
"CHANGELOG.md"
7173
]
7274
}
73-
]
75+
],
76+
"@semantic-release/github"
7477
]
7578
}
7679
}

0 commit comments

Comments
 (0)