-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (54 loc) · 1.46 KB
/
release.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Release package
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
env:
DEPLOYMENT_URL: https://www.npmjs.com/package/@dataesr/doadify
jobs:
release:
name: Release new version
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create changelog text
id: changelog
uses: loopwerk/tag-changelog@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: 📦 Create release
id: create_release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
#tag_name: ${{ steps.tag.outputs.tag }}
publish:
name: Publish release on NPM
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
scope: '@dataesr'
- run: npm ci
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
notify:
name: Notify
needs: publish
if: always()
runs-on: ubuntu-latest
steps:
- uses: dataesr/mm-notifier-action@v1
with:
deployment_url: ${{ env.DEPLOYMENT_URL }}
github_token: ${{ secrets.GITHUB_TOKEN }}
mattermost_channel: bots
mattermost_webhook_url: ${{ secrets.MATTERMOST_WEBHOOK_URL }}