From 4c956dc85c4b387a420512deb4b44d17739dd6ed Mon Sep 17 00:00:00 2001 From: Levende Date: Sat, 25 May 2024 15:32:08 +0200 Subject: [PATCH] fit: fix github workflow (#16) --- .changeset/neat-goats-jog.md | 5 +++++ .github/workflows/publish.yml | 27 ++++++++++----------------- 2 files changed, 15 insertions(+), 17 deletions(-) create mode 100644 .changeset/neat-goats-jog.md diff --git a/.changeset/neat-goats-jog.md b/.changeset/neat-goats-jog.md new file mode 100644 index 0000000..635085f --- /dev/null +++ b/.changeset/neat-goats-jog.md @@ -0,0 +1,5 @@ +--- +"@lawndlwd/unused-i18n": patch +--- + +fix github workflow diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2392679..1320073 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,17 +1,13 @@ -name: Create Release Pull Request +name: Publish to npm on: - push: - branches: - - main - -concurrency: ${{ github.workflow }}-${{ github.ref }} + release: + types: [created] jobs: - create-release-pr: - name: Create Release Pull Request + publish: + name: Publish runs-on: ubuntu-latest - permissions: write-all steps: - uses: actions/checkout@v4 @@ -19,7 +15,6 @@ jobs: run: | git config --global user.name 'levende' git config --global user.email 'lwdlwd95@gmail.com' - git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -35,11 +30,9 @@ jobs: - run: pnpm install - - name: Create Release Pull Request - id: changesets - uses: changesets/action@v1 - with: - commit: 'chore: release' - title: 'chore: release' + - run: pnpm build + + - name: Publish to npm + run: npm publish env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}