-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.13 KB
/
release.yml
File metadata and controls
50 lines (41 loc) · 1.13 KB
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
name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [19.x]
steps:
- name: Checkout codebase
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Info
id: info
run: |
RELEASE_NAME="task.json-web-${GITHUB_REF#refs/tags/}"
echo "::set-output name=RELEASE_NAME::$RELEASE_NAME"
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
- name: Build task.json-web
run: |
npm ci --no-optional
npm run build
- name: Create archive
run: |
cd build
zip -9 -r ../$RELEASE_NAME.zip .
tar -cavf ../$RELEASE_NAME.tar.zst .
- name: Upload to GitHub release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
file: ./${{ steps.info.outputs.RELEASE_NAME }}.*
tag: ${{ github.ref }}
overwrite: true