-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (73 loc) · 2.21 KB
/
Copy pathrelease.yml
File metadata and controls
90 lines (73 loc) · 2.21 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
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
79
80
81
82
83
84
85
86
87
88
89
90
name: Release Binaries
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
target: bun-linux-x64
output: prospec-linux-x64
- os: macos-latest
target: bun-darwin-arm64
output: prospec-macos-arm64
sign: true
- os: macos-latest
target: bun-darwin-x64
output: prospec-macos-x64
sign: true
- os: windows-latest
target: bun-windows-x64
output: prospec-windows-x64.exe
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- uses: oven-sh/setup-bun@v2
- name: Build bundle
run: pnpm run bundle
- name: Compile Standalone Binary
run: bun build ./dist/cli-bundle.js --compile --minify --target=${{ matrix.target }} --outfile=dist/${{ matrix.output }}
- name: Code Sign (macOS only)
if: ${{ matrix.sign }}
run: |
codesign --remove-signature dist/${{ matrix.output }} || true
codesign --force --sign - dist/${{ matrix.output }}
- name: Smoke Test (Non-Windows)
if: matrix.os != 'windows-latest'
run: ./dist/${{ matrix.output }} --version
- name: Smoke Test (Windows)
if: matrix.os == 'windows-latest'
run: .\dist\${{ matrix.output }} --version
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.output }}
path: dist/${{ matrix.output }}
publish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: binaries
merge-multiple: true
- name: Display binaries
run: ls -la binaries
- name: Upload to Release
uses: softprops/action-gh-release@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: binaries/*