-
Notifications
You must be signed in to change notification settings - Fork 18
57 lines (51 loc) · 1.68 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
name: Package and Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [18, 20]
include:
- os: macos-latest
arch: x86_64
- os: macos-latest
arch: arm64
- os: ubuntu-latest
arch: x86_64
- os: ubuntu-latest
arch: arm64
- os: windows-latest
arch: x86_64
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm install
- name: Zip files
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
powershell.exe -Command "Compress-Archive -Path . -DestinationPath evidence-${{ matrix.os }}-${{ matrix.arch }}-node${{ matrix.node }}.zip -Force"
else
zip -r evidence-${{ matrix.os }}-${{ matrix.arch }}-node${{ matrix.node }}.zip . -x "*.git*"
fi
- name: Upload to GH release
uses: ncipollo/release-action@v1
with:
artifacts: evidence-${{ matrix.os }}-${{ matrix.arch }}-node${{ matrix.node }}.zip
token: ${{ secrets.GH_ACTIONS_RELEASE_TOKEN }}
tag: ${{ github.ref }}
name: Release ${{ github.ref }}
body: |
Release for ${{ matrix.os }} ${{ matrix.arch }} with Node.js ${{ matrix.node }}
draft: false
prerelease: false
allowUpdates: true # This allows updating existing releases