Skip to content

Commit

Permalink
👷 Reorganize release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
spontoreau committed Jul 12, 2023
1 parent ec5d743 commit 118460b
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,30 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

release:
needs: [publish-beta, package-version]
environment: production
runs-on: ubuntu-latest
env:
VERSION: ${{ needs.package-version.outputs.packageVersion }}
steps:
- uses: actions/checkout@v3
- name: Push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: false
default_prerelease_bump: false
custom_tag: ${{ env.VERSION }}
tag_prefix: ''
- name: Create release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}

publish-latest:
needs: [release, package-version]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -87,27 +111,3 @@ jobs:
npm publish --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

release:
needs: [publish-beta, package-version]
environment: production
runs-on: ubuntu-latest
env:
VERSION: ${{ needs.package-version.outputs.packageVersion }}
steps:
- uses: actions/checkout@v3
- name: Push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: false
default_prerelease_bump: false
custom_tag: ${{ env.VERSION }}
tag_prefix: ''
- name: Create release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}

0 comments on commit 118460b

Please sign in to comment.