mirror of
https://github.com/CraftyBoss/SuperMarioOdysseyOnline.git
synced 2024-11-25 04:35:17 +00:00
Merge pull request #32 from Istador/dev-releases
Automatically attach dev builds into one common release
This commit is contained in:
commit
d4df8f030c
5 changed files with 89 additions and 2 deletions
6
.github/actions/build/action.yml
vendored
6
.github/actions/build/action.yml
vendored
|
@ -6,6 +6,10 @@ inputs:
|
||||||
description : 'version tag'
|
description : 'version tag'
|
||||||
required : false
|
required : false
|
||||||
default : ''
|
default : ''
|
||||||
|
prefix:
|
||||||
|
description : 'filename prefix'
|
||||||
|
required : false
|
||||||
|
default : ''
|
||||||
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
|
@ -24,7 +28,7 @@ runs:
|
||||||
run: |
|
run: |
|
||||||
VERS=${{ inputs.tag }}
|
VERS=${{ inputs.tag }}
|
||||||
echo "::set-output name=version::${VERS:1}"
|
echo "::set-output name=version::${VERS:1}"
|
||||||
echo "::set-output name=filename::SMO_Online${{ (inputs.tag != '' && format('_{0}', inputs.tag)) || '' }}"
|
echo "::set-output name=filename::${{ inputs.prefix }}SMO_Online${{ (inputs.tag != '' && format('_{0}', inputs.tag)) || '' }}"
|
||||||
-
|
-
|
||||||
name : Set up Docker Buildx
|
name : Set up Docker Buildx
|
||||||
uses : docker/setup-buildx-action@v2
|
uses : docker/setup-buildx-action@v2
|
||||||
|
|
2
.github/actions/release/action.yml
vendored
2
.github/actions/release/action.yml
vendored
|
@ -30,7 +30,7 @@ runs:
|
||||||
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tag_name : ${{ inputs.tag }}
|
tag_name : ${{ inputs.tag }}
|
||||||
release_name : Release ${{ inputs.tag }}
|
release_name : ${{ inputs.tag }}
|
||||||
body : ''
|
body : ''
|
||||||
draft : true
|
draft : true
|
||||||
prerelease : false
|
prerelease : false
|
||||||
|
|
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -5,9 +5,13 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '**'
|
- '**'
|
||||||
|
- '!dev'
|
||||||
tags:
|
tags:
|
||||||
- '**'
|
- '**'
|
||||||
- '!v[0-9]+.[0-9]+.[0-9]+'
|
- '!v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
- '!v[0-9]+.[0-9]+.[0-9]+\+*'
|
||||||
|
- '!v[0-9]+.[0-9]+.[0-9]+-*'
|
||||||
|
- '!latest-dev'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- '**'
|
- '**'
|
||||||
|
|
77
.github/workflows/dev-release.yml
vendored
Normal file
77
.github/workflows/dev-release.yml
vendored
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
name: Dev Release
|
||||||
|
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'dev'
|
||||||
|
|
||||||
|
|
||||||
|
env:
|
||||||
|
TAG : 'latest-dev'
|
||||||
|
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
filename: ${{ steps.build.outputs.filename }}
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name : Checkout
|
||||||
|
uses : actions/checkout@v3
|
||||||
|
-
|
||||||
|
name : Environment
|
||||||
|
id : env
|
||||||
|
shell : bash
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=prefix::$(date +'%Y%m%d_%H%M%S_' --utc)"
|
||||||
|
-
|
||||||
|
name : Build artifacts
|
||||||
|
id : build
|
||||||
|
uses : ./.github/actions/build
|
||||||
|
with:
|
||||||
|
prefix : ${{ steps.env.outputs.prefix }}
|
||||||
|
|
||||||
|
attach:
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name : Checkout
|
||||||
|
uses : actions/checkout@v3
|
||||||
|
-
|
||||||
|
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 "::set-output name=upload_url::$url"
|
||||||
|
-
|
||||||
|
name : Attach build artifacts to release
|
||||||
|
uses : ./.github/actions/attach
|
||||||
|
with:
|
||||||
|
filename : ${{ needs.build.outputs.filename }}
|
||||||
|
upload_url : ${{ steps.release.outputs.upload_url }}
|
||||||
|
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
move:
|
||||||
|
needs: attach
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name : Checkout
|
||||||
|
uses : actions/checkout@v3
|
||||||
|
-
|
||||||
|
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 }}
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
@ -5,6 +5,8 @@ on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+\+*'
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+-*'
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
Loading…
Reference in a new issue