diff --git a/.github/workflows/comment.yml b/.github/workflows/comment.yml deleted file mode 100644 index f916053..0000000 --- a/.github/workflows/comment.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: comment - -on: - issue_comment: - types: [created] - -permissions: - contents: write - id-token: write - packages: read - issues: write - pull-requests: write - -jobs: - comment: - runs-on: ubuntu-latest - if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER') && contains(github.event.comment.body, '/release') }} - steps: - - name: Post workflow URL as comment - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - await github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `${process.env.GITHUB_SERVER_URL}/${context.repo.owner}/${context.repo.repo}/actions/runs/${process.env.GITHUB_RUN_ID}` - }); - publish_call: - needs: comment - uses: ./.github/workflows/publish.yml - secrets: inherit diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 163ca78..72acade 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,9 @@ name: publish on: - workflow_call: + push: + tags: + - 'v*' workflow_dispatch: jobs: @@ -19,15 +21,7 @@ jobs: with: node-version: 18 registry-url: 'https://registry.npmjs.org' - - name: git config user - run: | - git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - git config --global user.name "GitHub Actions" - run: npm ci - - run: git status - - run: git reset --hard - - run: npm version patch - run: npm publish --provenance --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - run: git push origin && git push origin --tags