-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (64 loc) · 2 KB
/
Copy pathrelease.yml
File metadata and controls
68 lines (64 loc) · 2 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
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
target: bun-linux-x64
artifact: pubmd-linux-x64
- os: ubuntu-latest
target: bun-linux-arm64
artifact: pubmd-linux-arm64
- os: macos-latest
target: bun-darwin-arm64
artifact: pubmd-darwin-arm64
- os: macos-15-intel
target: bun-darwin-x64
artifact: pubmd-darwin-x64
- os: windows-latest
target: bun-windows-x64
artifact: pubmd-windows-x64.exe
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bun build src/cli/main.ts --compile --target=${{ matrix.target }} --outfile ${{ matrix.artifact }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
- name: Generate checksum
shell: bash
run: |
if command -v sha256sum >/dev/null 2>&1; then
sha256sum ${{ matrix.artifact }} > ${{ matrix.artifact }}.sha256
elif command -v shasum >/dev/null 2>&1; then
shasum -a 256 ${{ matrix.artifact }} > ${{ matrix.artifact }}.sha256
else
certutil -hashfile ${{ matrix.artifact }} SHA256 | head -2 | tail -1 | tr -d ' ' > ${{ matrix.artifact }}.sha256
fi
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}-sha256
path: ${{ matrix.artifact }}.sha256
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- run: chmod +x pubmd-linux-* pubmd-darwin-* 2>/dev/null || true
- uses: softprops/action-gh-release@v2
with:
files: |
pubmd-*
*.sha256