diff --git a/.github/workflows/notify.yml b/.github/workflows/notify.yml index 4df1459..384602c 100644 --- a/.github/workflows/notify.yml +++ b/.github/workflows/notify.yml @@ -12,12 +12,12 @@ on: # branches: # - main # - 'v**' - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' - branches: - - main - - 'v**' + #push: + # tags: + # - 'v[0-9]+.[0-9]+.[0-9]+' + # branches: + # - main + # - 'v**' workflow_dispatch: inputs: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 080b8f2..ada28b2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -56,3 +56,25 @@ jobs: run: npm publish --provenance --access public env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} + notify: + needs: [publish] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: git config + run: | + git config user.name "${GITHUB_ACTOR}" + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: npm + - run: npm ci + ############# Add release comments and tags to published PRs ############## + - name: Notify published PRs + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: node ./bin/actions/notify_published.js --tag ${{ github.event.inputs.tag || github.event.release.tag_name }}