Skip to content

Commit

Permalink
💚 Fix release
Browse files Browse the repository at this point in the history
  • Loading branch information
spontoreau committed Jul 7, 2023
1 parent d276a4e commit 502d1e6
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,32 +60,8 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

release:
needs: publish-beta
runs-on: ubuntu-latest
environment: production
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
needs: [release, package-version]
runs-on: ubuntu-latest
env:
VERSION: ${{ needs.package-version.outputs.packageVersion }}
Expand All @@ -106,8 +82,32 @@ jobs:
export PACKAGE_VERSION="${{ env.VERSION }}" && node -p "JSON.stringify({...require('./package.json'), version: process.env.PACKAGE_VERSION})" > new-package.json
rm -rf package.json
mv new-package.json package.json
# - name: Publish latest version
# run: |
# npm publish --tag latest
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Publish latest version
run: |
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 502d1e6

Please sign in to comment.