-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (66 loc) · 2.02 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
on:
push:
tags:
- 'v*'
name: Create Release
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build
run: mvn clean package -DskipTests
- name: Extract Semver
id: semver_parser
run: |
semver=${TAG#"refs/tags/v"}
semver=${semver%"-voyager"}
echo ::set-output name=semver::$semver
env:
TAG: ${{ github.ref }}
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
cache: 'npm'
registry-url: 'https://npm.pkg.github.com'
scope: '@dxworks'
- name: Prepare Node App
run: |
npm install
npm run build
- name: Setup Version
run: |
node_modules/.bin/json -I -f package.json -e "this.version='$VERSION'"
env:
VERSION: ${{ steps.semver_parser.outputs.semver }}
- name: Publish NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node with NPM Package Registry
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
scope: '@dxworks'
- name: Publish on NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Prepare Release Notes
run: touch ${{ github.workspace }}/releaseNotes/v${{ steps.semver_parser.outputs.semver }}.md
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
name: Tables ${{ steps.semver_parser.outputs.semver }}
body_path: ${{ github.workspace }}/releaseNotes/v${{ steps.semver_parser.outputs.semver }}.md
body: ""
prerelease: false
draft: false
fail_on_unmatched_files: true
files: dist/overview-tables.jar