Skip to content

Commit 7f7e4a9

Browse files
committed
Updated build-release workflow:
- consolidated the "build" and docs build into one job - version-stamp the header file before adding it as a release artifact
1 parent d798dc4 commit 7f7e4a9

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

.github/workflows/build-release.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,30 @@ on:
55
types: [published]
66

77
jobs:
8-
# just upload the header file to the Github release object for the "build" job
9-
build-release:
8+
build:
109
runs-on: ubuntu-20.04
1110
steps:
1211
- uses: actions/checkout@v2
12+
- name: Set Tag Name
13+
# trim prefix from ref to get tag name
14+
run: echo "TAG_NAME=${GITHUB_REF#'refs/tags/'}" >> $GITHUB_ENV
15+
- name: Version-stamp Header file
16+
working-directory: ${{github.workspace}}
17+
run: |
18+
echo "// Unmoving $TAG_NAME downloaded from Github at https://github.com/saxbophone/unmoving/releases" > header_stub.hpp
19+
cat header_stub.hpp unmoving/include/unmoving/PSXFixed.hpp > PSXFixed.hpp
1320
- name: Upload Header file
1421
uses: actions/upload-artifact@v2
1522
with:
1623
name: PSXFixed.hpp
17-
path: ${{github.workspace}}/unmoving/include/PSXFixed.hpp
18-
build-docs:
19-
runs-on: ubuntu-20.04
20-
# don't deploy docs unless release build succeeds
21-
needs: build-release
22-
steps:
23-
- uses: actions/checkout@v2
24-
- name: Set Tag Name
25-
shell: bash
26-
# trim prefix from ref to get tag name
27-
run: echo "TAG_NAME=${GITHUB_REF#'refs/tags/'}" >> $GITHUB_ENV
24+
working-directory: ${{github.workspace}}
25+
path: PSXFixed.hpp
2826
- name: Format Docs Version Name
29-
shell: bash
3027
# trim patch version off version number as minor version specifies ABI changes
3128
run: echo "DOCS_VERSION=${TAG_NAME%.*}" >> $GITHUB_ENV
3229
- name: Build Doxygen Docs
3330
uses: mattnotmitt/[email protected]
3431
- name: Set up latest docs auto-linking
35-
shell: bash
3632
working-directory: ${{github.workspace}}
3733
# make docs folder, move docs there, call script to generate HTML redirect in index
3834
run: |

0 commit comments

Comments
 (0)