-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (32 loc) · 1.09 KB
/
publish-release-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Publish Release Package
on:
release:
types: [published]
jobs:
publish-release:
name: Publish release package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
registry-url: https://registry.npmjs.org/
- name: Parse Tag
run: |
if echo -n "${{ github.ref }}" | grep -qE "refs/tags/chess-achievements@";then
echo "PUBLISH=1" >> $GITHUB_ENV
fi
- name: Publish package
if: env.PUBLISH == 1
run: tasks/npm-publish.sh . latest
env:
PAT: ${{ secrets.PAT }}
NPMJS_TOKEN: ${{ secrets.NPMJS_TOKEN }}
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_DEVOPS }}
uses: Ilshidur/action-discord@0c4b27844ba47cb1c7bee539c8eead5284ce9fa9
with:
args: "📦 `@treasure-chess/chess-image-generator@latest` was published! https://www.npmjs.com/package/@treasure-chess/chess-image-generator"