SuperMarioOdysseyOnline/.github/workflows/dev-release.yml

96 lines
2.3 KiB
YAML
Raw Normal View History

name: Dev Release
on:
push:
branches:
- 'dev'
env:
TAG : 'latest-dev'
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
build:
2022-09-04 23:41:34 +00:00
strategy:
matrix:
2023-06-05 19:54:14 +00:00
emu : [ Switch, Emulators ]
runs-on: ubuntu-latest
outputs:
2022-09-04 23:41:34 +00:00
filename1: ${{ steps.set-output.outputs.filename-Switch }}
2023-09-04 01:39:03 +00:00
filename2: ${{ steps.set-output.outputs.filename-Emulators }}
steps:
-
name : Checkout
2024-05-15 19:50:36 +00:00
uses : actions/checkout@v4
-
name : Environment
id : env
shell : bash
run: |
echo "prefix=$(date +'%Y%m%d_%H%M%S_' --utc)" >>$GITHUB_OUTPUT
-
name : Build artifacts
id : build
uses : ./.github/actions/build
with:
prefix : ${{ steps.env.outputs.prefix }}
2022-09-04 23:41:34 +00:00
emu : ${{ matrix.emu }}
-
name : Set output
id : set-output
shell : bash
run : |
echo "filename-${{ matrix.emu }}=${{ steps.build.outputs.filename }}" >>$GITHUB_OUTPUT
attach:
needs: build
runs-on: ubuntu-latest
steps:
-
name : Checkout
2024-05-15 19:50:36 +00:00
uses : actions/checkout@v4
-
name : Get release info
id : release
shell : bash
run: |
url=`curl -sS --fail ${{ github.api_url }}/repos/${{ github.repository }}/releases/tags/${{ env.TAG }} | jq .upload_url -r`
echo "upload_url=$url" >>$GITHUB_OUTPUT
-
2022-09-04 23:41:34 +00:00
name : Attach build artifacts to release (Switch)
uses : ./.github/actions/attach
with:
filename : ${{ needs.build.outputs.filename1 }}
upload_url : ${{ steps.release.outputs.upload_url }}
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
-
2023-06-05 19:54:14 +00:00
name : Attach build artifacts to release (Emulators)
uses : ./.github/actions/attach
with:
2022-09-04 23:41:34 +00:00
filename : ${{ needs.build.outputs.filename2 }}
upload_url : ${{ steps.release.outputs.upload_url }}
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2022-08-13 20:01:38 +00:00
move:
needs: attach
runs-on: ubuntu-latest
steps:
-
name : Checkout
2024-05-15 19:50:36 +00:00
uses : actions/checkout@v4
2022-08-13 20:01:38 +00:00
-
name : Move ${{ env.TAG }} tag
shell : bash
run: |
git config user.email "${{ github.actor }}@users.noreply.github.com"
git tag -f ${{ env.TAG }}
git push --force origin ${{ env.TAG }}