-
Notifications
You must be signed in to change notification settings - Fork 11
67 lines (55 loc) · 1.42 KB
/
release.yml
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
name: Build, Release, and Update Homebrew
# on:
# push:
# tags:
# - 'v*'
jobs:
build:
name: Build for all targets
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Install FFmpeg
run: |
brew install ffmpeg
- name: Build for all targets
run: |
zig build -Drelease -Dci=true
- name: Prepare release assets
run: |
mkdir release_assets
cd zig-out
for dir in */; do
target=${dir%/}
tar cvzf ../release_assets/asciigen-$target.tar.gz $target
(cd ../release_assets && sha256sum asciigen-$target.tar.gz > asciigen-$target.tar.gz.sha256)
done
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: release-assets
path: release_assets/*
release:
name: Create Release and Update Homebrew
permissions:
contents: write
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: release-assets
path: release_assets
- name: Release
uses: softprops/action-gh-release@v2
with:
files: release_assets/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}