-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (81 loc) · 2.63 KB
/
Copy pathcli-build.yml
File metadata and controls
91 lines (81 loc) · 2.63 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
91
name: cli-build
on:
push:
branches:
- main
release:
types: [published]
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: bun-linux-x64
os: ubuntu-latest
artifact: video-link-debugger-linux-x64
- target: bun-linux-x64-baseline
os: ubuntu-latest
artifact: video-link-debugger-linux-x64-baseline
- target: bun-linux-x64-modern
os: ubuntu-latest
artifact: video-link-debugger-linux-x64-modern
- target: bun-linux-arm64
os: ubuntu-24.04-arm
artifact: video-link-debugger-linux-arm64
- target: bun-windows-x64
os: windows-latest
artifact: video-link-debugger-windows-x64.exe
- target: bun-windows-x64-modern
os: windows-latest
artifact: video-link-debugger-windows-x64-modern.exe
- target: bun-windows-arm64
os: windows-11-arm
artifact: video-link-debugger-windows-arm64.exe
- target: bun-darwin-arm64
os: macos-latest
artifact: video-link-debugger-darwin-arm64
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- name: Compile
shell: bash
run: bun build --compile --target=${{ matrix.target }} ./src/index.ts --outfile "${{ matrix.artifact }}"
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
if-no-files-found: error
retention-days: 7
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Create commit-hash prerelease
if: github.event_name == 'push'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "commit-${{ github.sha }}" \
--repo "${{ github.repository }}" \
--target "${{ github.sha }}" \
--title "${{ github.sha }}" \
--notes "Automated build for commit ${{ github.sha }}" \
--prerelease \
dist/*
- name: Upload to release-please release
if: github.event_name == 'release'
env:
GH_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
run: |
gh release upload "${{ github.event.release.tag_name }}" dist/* \
--repo "${{ github.repository }}" \
--clobber