generated from saxbophone/CPP20-Cross-Platform-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- consolidated the "build" and docs build into one job - version-stamp the header file before adding it as a release artifact
- Loading branch information
1 parent
d798dc4
commit 7f7e4a9
Showing
1 changed file
with
11 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,34 +5,30 @@ on: | |
types: [published] | ||
|
||
jobs: | ||
# just upload the header file to the Github release object for the "build" job | ||
build-release: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set Tag Name | ||
# trim prefix from ref to get tag name | ||
run: echo "TAG_NAME=${GITHUB_REF#'refs/tags/'}" >> $GITHUB_ENV | ||
- name: Version-stamp Header file | ||
working-directory: ${{github.workspace}} | ||
run: | | ||
echo "// Unmoving $TAG_NAME downloaded from Github at https://github.com/saxbophone/unmoving/releases" > header_stub.hpp | ||
cat header_stub.hpp unmoving/include/unmoving/PSXFixed.hpp > PSXFixed.hpp | ||
- name: Upload Header file | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: PSXFixed.hpp | ||
path: ${{github.workspace}}/unmoving/include/PSXFixed.hpp | ||
build-docs: | ||
runs-on: ubuntu-20.04 | ||
# don't deploy docs unless release build succeeds | ||
needs: build-release | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set Tag Name | ||
shell: bash | ||
# trim prefix from ref to get tag name | ||
run: echo "TAG_NAME=${GITHUB_REF#'refs/tags/'}" >> $GITHUB_ENV | ||
working-directory: ${{github.workspace}} | ||
path: PSXFixed.hpp | ||
- name: Format Docs Version Name | ||
shell: bash | ||
# trim patch version off version number as minor version specifies ABI changes | ||
run: echo "DOCS_VERSION=${TAG_NAME%.*}" >> $GITHUB_ENV | ||
- name: Build Doxygen Docs | ||
uses: mattnotmitt/[email protected] | ||
- name: Set up latest docs auto-linking | ||
shell: bash | ||
working-directory: ${{github.workspace}} | ||
# make docs folder, move docs there, call script to generate HTML redirect in index | ||
run: | | ||
|