-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (66 loc) · 2.01 KB
/
release.yaml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Release
on:
workflow_dispatch:
inputs:
release-version:
description: 'Version being released'
required: true
jobs:
release:
name: Verify Build & Release
runs-on: ubuntu-latest
steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Check Node Version
run: node --version
- name: Checkout code
uses: actions/checkout@v3
with:
ref: main
- name: Configure Git
run: |
git init
git config --global user.name "apicurio-ci"
git config --global user.email "[email protected]"
git branch --set-upstream-to=origin/main
git pull
echo "#### Listing files ####"
find .
- name: Set release version in package.json
run: |
npm version ${{ github.event.inputs.release-version }}
- name: Build Project
run: |
npm install
npm run lint
npm run build
- name: Push Release Version Change
run: |
git push
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.inputs.release-version}}
- name: Publish to npmjs.com
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm publish --access public
- name: Google Chat Notification (Always)
if: always()
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
with:
name: ${{ github.job }}
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
status: ${{ job.status }}
- name: Google Chat Notification (Error)
if: failure()
uses: Co-qn/google-chat-notification@b9227d9daa4638c9782a5bd16c4abb86268127a1
with:
name: ${{ github.job }}
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_ERRORS }}
status: ${{ job.status }}