Skip to content

Commit d3b2101

Browse files
committed
feat: add release workflow
1 parent fc10f18 commit d3b2101

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
build-and-release:
10+
runs-on: ${{ matrix.runs-on }}
11+
strategy:
12+
matrix:
13+
runs-on: [ubuntu-latest, windows-latest, macOS-latest]
14+
arch: [x64, arm64]
15+
node-version: ['18']
16+
include:
17+
- runs-on: ubuntu-latest
18+
os: linux
19+
- runs-on: windows-latest
20+
os: win
21+
- runs-on: macOS-latest
22+
os: macos
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
27+
- name: Package Node.js binary with pkg
28+
id: pkg-action
29+
uses: lando/pkg-action@v2
30+
with:
31+
entrypoint: bin/cli
32+
arch: ${{ matrix.arch }}
33+
node-version: ${{ matrix.node-version }}
34+
os: ${{ matrix.os }}
35+
36+
- name: Release
37+
uses: softprops/action-gh-release@v1
38+
if: startsWith(github.ref, 'refs/tags/')
39+
with:
40+
files: |
41+
${{ steps.pkg-action.outputs.file }}
42+
name: Release-${{ matrix.os }}-${{ matrix.arch }}
43+
tag_name: ${{ github.ref }}
44+

0 commit comments

Comments
 (0)