-
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (49 loc) · 1.87 KB
/
Copy pathrelease.yml
File metadata and controls
55 lines (49 loc) · 1.87 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
name: Release
on:
push:
branches: [main]
permissions:
contents: write
issues: write
pull-requests: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v6
with:
extra_plugins: |
@semantic-release/exec
@semantic-release/github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build binaries
if: steps.semantic.outputs.new_release_published == 'true'
run: |
tag="v${{ steps.semantic.outputs.new_release_version }}"
git checkout "$tag"
# Linux x86_64
deno compile --allow-read --allow-write --allow-env --allow-ffi --output ocv --target x86_64-unknown-linux-gnu main.ts
tar czf ocv-x86_64-linux.tar.gz ocv && rm ocv
# Linux ARM64
deno compile --allow-read --allow-write --allow-env --allow-ffi --output ocv --target aarch64-unknown-linux-gnu main.ts
tar czf ocv-aarch64-linux.tar.gz ocv && rm ocv
# macOS ARM64
deno compile --allow-read --allow-write --allow-env --allow-ffi --output ocv --target aarch64-apple-darwin main.ts
tar czf ocv-aarch64-macos.tar.gz ocv && rm ocv
# macOS x86_64
deno compile --allow-read --allow-write --allow-env --allow-ffi --output ocv --target x86_64-apple-darwin main.ts
tar czf ocv-x86_64-macos.tar.gz ocv && rm ocv
- name: Upload binaries to release
if: steps.semantic.outputs.new_release_published == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="v${{ steps.semantic.outputs.new_release_version }}"
gh release upload "$tag" ocv-*.tar.gz