From 1f8dd510eab8676ba71555b9bd06a9fd2f4a125c Mon Sep 17 00:00:00 2001 From: Levend Date: Sat, 25 May 2024 16:27:03 +0200 Subject: [PATCH] fit: fix github workflow --- .changeset/sweet-students-decide.md | 5 +++++ .github/workflows/release.yml | 21 ++++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 .changeset/sweet-students-decide.md diff --git a/.changeset/sweet-students-decide.md b/.changeset/sweet-students-decide.md new file mode 100644 index 0000000..47ca8d7 --- /dev/null +++ b/.changeset/sweet-students-decide.md @@ -0,0 +1,5 @@ +--- +"unused-i18n": patch +--- + +fix workflow diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8d32b7b..2542457 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,11 @@ on: jobs: release: runs-on: ubuntu-latest - permissions: write-all + permissions: + contents: write + packages: write + issues: write + pull-requests: write steps: - uses: actions/checkout@v4 @@ -35,7 +39,18 @@ jobs: with: commit: 'chore: release' title: 'chore: release' - publish: pnpm publish --access public + publish: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish to npm + if: steps.changesets.outputs.published == 'true' + run: pnpm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Push changes and tags + run: | + git push --follow-tags origin main env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }}