-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revamps the GitHub Actions workflows to the following: **build.yml** Verifies pull requests and commits to main. Archives debug/release builds for them respectively. **publish.yml** On tag, downloads the relevant release build and publishes it as a GitHub Release. Fixes #18
- Loading branch information
Thierry Lacour
committed
Jul 15, 2021
1 parent
8cc4f2e
commit 85608f5
Showing
3 changed files
with
96 additions
and
32 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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
platform: [ linux, windows, mac ] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
lfs: true | ||
|
||
- name: Run GUT tests | ||
uses: josephbmanley/[email protected] | ||
|
||
- name: Decide debugMode | ||
uses: haya14busa/action-cond@v1 | ||
id: debugMode | ||
with: | ||
cond: ${{ github.event_name == 'pull_request' }} | ||
if_true: "true" | ||
if_false: "false" | ||
|
||
- name: Build game client | ||
id: build | ||
uses: josephbmanley/[email protected] | ||
with: | ||
name: NeoMori | ||
preset: ${{ matrix.platform }} | ||
debugMode: ${{ steps.debugMode.outputs.value }} | ||
|
||
- name: Upload build | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.platform }} | ||
path: ${{ github.workspace }}/build/* | ||
|
||
- name: Git describe | ||
run: echo "GIT_DESCRIBE=$(git describe)" >> $GITHUB_ENV | ||
|
||
- name: Create override.cfg | ||
if: ${{ env.GIT_DESCRIBE != '' }} | ||
run: echo "global/version = $GIT_DESCRIBE" > override.cfg | ||
|
||
- name: Upload override.cfg | ||
if: ${{ env.GIT_DESCRIBE != '' }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.platform }} | ||
path: ${{ github.workspace }}/override.cfg |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
platform: [ linux, windows, mac ] | ||
|
||
steps: | ||
- name: Download client | ||
uses: dawidd6/action-download-artifact@v2 | ||
with: | ||
workflow: build.yml | ||
workflow_conclusion: success | ||
commit: ${{ github.sha }} | ||
event: push | ||
name: ${{ matrix.platform }} | ||
path: NeoMori | ||
|
||
- name: Zip client | ||
run: zip -q -r ${{ matrix.platform }}.zip NeoMori | ||
|
||
- name: Publish clients | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ${{ matrix.platform }}.zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.