Skip to content

Commit f57bb60

Browse files
committed
fix: github release
1 parent 079061a commit f57bb60

File tree

2 files changed

+12
-44
lines changed

2 files changed

+12
-44
lines changed

.github/workflows/publish.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ on:
77
permissions:
88
contents: write
99
jobs:
10-
publish:
10+
check:
1111
runs-on: ubuntu-latest
1212
environment: Production
13+
outputs:
14+
VERSION_EXISTS: ${{ steps.check-version.outputs.VERSION_EXISTS }}
15+
VERSION: ${{ steps.get-version.outputs.VERSION }}
1316
steps:
1417
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
1518
- uses: actions/checkout@v4
@@ -40,26 +43,28 @@ jobs:
4043
else
4144
echo "VERSION_EXISTS=false" >> "$GITHUB_OUTPUT"
4245
fi
46+
publish:
47+
runs-on: ubuntu-latest
48+
environment: Production
49+
needs: check
50+
if: needs.check.outputs.VERSION_EXISTS == 'false'
51+
steps:
4352
- name: Build package
44-
if: steps.check-version.outputs.VERSION_EXISTS == 'false'
4553
run: |
4654
npm ci
4755
npm run build
4856
- name: Publish to NPM
49-
if: steps.check-version.outputs.VERSION_EXISTS == 'false'
5057
run: npm publish
5158
env:
5259
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5360
- name: Publish git tag
54-
if: steps.check-version.outputs.VERSION_EXISTS == 'false'
5561
run: |
5662
git config --global user.name 'github-actions[bot]'
5763
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
58-
git tag ${{ steps.get-version.outputs.VERSION }}
64+
git tag ${{ needs.check.outputs.VERSION }}
5965
git push origin --tags
6066
- name: Publish git release
61-
if: steps.check-version.outputs.VERSION_EXISTS == 'false'
6267
env:
6368
GH_TOKEN: ${{ github.token }}
6469
run: |
65-
gh release create ${{ github.env.VERSION }} --title "${{ github.env.VERSION }}" --generate-notes
70+
gh release create ${{ needs.check.outputs.VERSION }} --title "${{ needs.check.outputs.VERSION }}" --generate-notes

.github/workflows/version_bump.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)