mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-04-11 23:19:00 +08:00
ci: fixing issues with releaser workflow
This commit is contained in:
parent
1c8477ba4a
commit
5de63b3495
23
.github/workflows/perform-release.yml
vendored
23
.github/workflows/perform-release.yml
vendored
@ -46,7 +46,7 @@ jobs:
|
||||
uses: bdunderscore/modular-avatar/.github/workflows/build-test-docs.yml@main
|
||||
|
||||
create-release:
|
||||
needs: [check-gameci, check-docs]
|
||||
needs: [ check-gameci, check-docs ]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@ -55,6 +55,13 @@ jobs:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
run: echo "$GITHUB_CONTEXT"
|
||||
|
||||
# https://github.com/orgs/community/discussions/13836#discussioncomment-8535364
|
||||
- uses: actions/create-github-app-token@v1
|
||||
id: app-token
|
||||
with:
|
||||
app-id: ${{ vars.RELEASER_APP_ID }}
|
||||
private-key: ${{ secrets.RELEASER_PRIVATE_KEY }}
|
||||
|
||||
- name: Validate prerelease version
|
||||
id: check-version
|
||||
if: ${{ github.event.inputs.release_kind == 'prerelease' && !contains(github.event.inputs.version, '-') }}
|
||||
@ -70,7 +77,7 @@ jobs:
|
||||
exit 1
|
||||
|
||||
- name: Validate adhoc
|
||||
id: validate-adhocc
|
||||
id: validate-adhoc
|
||||
if: ${{ github.event.inputs.release_kind == 'adhoc' && github.event.inputs.publish == 'true' }}
|
||||
run:
|
||||
echo "Adhoc release cannot be published"
|
||||
@ -99,6 +106,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
- name: Check semver syntax
|
||||
if: steps.check-tag.outputs.need-new-tag == 'true'
|
||||
@ -120,6 +128,7 @@ jobs:
|
||||
env:
|
||||
VERSION: ${{ github.event.inputs.version }}
|
||||
|
||||
|
||||
- name: Update changelog
|
||||
id: changelog
|
||||
run: |
|
||||
@ -127,12 +136,9 @@ jobs:
|
||||
|
||||
if [ "${{ env.PRERELEASE }}" == "true" ]; then
|
||||
./.github/cut-changelog.pl CHANGELOG-PRERELEASE.md .github/CHANGELOG-HEADER.md ${{ env.VERSION }} .github/relnote-en.md
|
||||
./.github/cut-changelog.pl CHANGELOG-PRERELEASE-jp.md .github/CHANGELOG-HEADER.md ${{ env.VERSION }} .github/relnote-jp.md
|
||||
else
|
||||
./.github/cut-changelog.pl CHANGELOG-PRERELEASE.md .github/CHANGELOG-HEADER.md ${{ env.VERSION }}
|
||||
./.github/cut-changelog.pl CHANGELOG-PRERELEASE-jp.md .github/CHANGELOG-HEADER.md ${{ env.VERSION }}
|
||||
./.github/cut-changelog.pl CHANGELOG.md .github/CHANGELOG-HEADER.md ${{ env.VERSION }} .github/relnote-en.md
|
||||
./.github/cut-changelog.pl CHANGELOG-jp.md .github/CHANGELOG-HEADER.md ${{ env.VERSION }} .github/relnote-jp.md
|
||||
fi
|
||||
|
||||
echo Version ${{ env.VERSION }} > release-note.md
|
||||
@ -144,8 +150,6 @@ jobs:
|
||||
fi
|
||||
echo '## Notable changes' >> release-note.md
|
||||
cat .github/relnote-en.md >> release-note.md
|
||||
echo '## 主な変更点' >> release-note.md
|
||||
cat .github/relnote-jp.md >> release-note.md
|
||||
|
||||
- name: Upload CHANGELOG.md
|
||||
if: ${{ github.event.inputs.release_kind == 'stable' }}
|
||||
@ -173,7 +177,10 @@ jobs:
|
||||
- name: Publish tag
|
||||
if: ${{ github.event.inputs.publish == 'true' }}
|
||||
run: |
|
||||
git push origin ${{ github.event.workflow_dispatch.base.ref }} ${{ github.event.inputs.version }}
|
||||
BRANCH_NAME=$(git branch --show-current)
|
||||
git push origin $BRANCH_NAME && git push origin ${{ github.event.inputs.version }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
- name: Create Zip
|
||||
run: |
|
||||
|
Loading…
x
Reference in New Issue
Block a user