mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
fix(ci): refactor notify action as a job of publish action; (#6176)
This commit is contained in:
@@ -12,12 +12,12 @@ on:
|
|||||||
# branches:
|
# branches:
|
||||||
# - main
|
# - main
|
||||||
# - 'v**'
|
# - 'v**'
|
||||||
push:
|
#push:
|
||||||
tags:
|
# tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
# - 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
branches:
|
# branches:
|
||||||
- main
|
# - main
|
||||||
- 'v**'
|
# - 'v**'
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
@@ -56,3 +56,25 @@ jobs:
|
|||||||
run: npm publish --provenance --access public
|
run: npm publish --provenance --access public
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
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 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user