mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
chore(ci): fixed release notification action; (#6063)
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
name: notify
|
||||
|
||||
on:
|
||||
#workflow_run:
|
||||
# workflows: ["publish"]
|
||||
# types:
|
||||
# - completed
|
||||
#repository_dispatch:
|
||||
# types: [ notify ]
|
||||
release:
|
||||
types: [ published ]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
required: true
|
||||
jobs:
|
||||
notify:
|
||||
runs-on: ubuntu-latest
|
||||
#if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
#- name: Dump GitHub context
|
||||
# env:
|
||||
# GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
# run: echo "$GITHUB_CONTEXT"
|
||||
- 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
|
||||
- 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 }}
|
||||
@@ -56,8 +56,3 @@ jobs:
|
||||
run: npm publish --provenance --access public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
||||
###### NOTIFY & TAG published PRs ######
|
||||
- name: Notify and tag published PRs
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: node ./bin/actions/notify_published.js --tag v${{ steps.package-version.outputs.current-version }}
|
||||
|
||||
Reference in New Issue
Block a user