-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.24 KB
/
github_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
name: Create GitHub release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+[a-c][0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-[a-c][0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+alpha[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+beta[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['16', '18', '20']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm install
- name: Generate build artifacts
run: npm run build
- name: Generate the package
run: npm pack
- name: Extract the package
run: tar -xzf fractal-web-*.tgz
- name: Repack the package removing parent folder
run: tar -C package -czf node-${{ matrix.node-version }}-fractal-web-${{ github.ref_name }}.tar.gz build package.json node_modules LICENSE
- name: Release
uses: softprops/action-gh-release@v2
with:
files: node-${{ matrix.node-version }}-fractal-web-${{ github.ref_name }}.tar.gz