-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (70 loc) · 2.19 KB
/
release.yml
File metadata and controls
84 lines (70 loc) · 2.19 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
name: Release
on:
push:
tags:
- "v*"
env:
CARGO_TERM_COLOR: always
permissions:
contents: write
jobs:
build:
name: Build for macOS
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: aarch64-apple-darwin
override: true
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --release --target aarch64-apple-darwin
- name: Create archive
run: |
cd target/aarch64-apple-darwin/release
tar czf tide.tar.gz tide
shasum -a 256 tide.tar.gz > tide.tar.gz.sha256
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
with:
files: |
target/aarch64-apple-darwin/release/tide.tar.gz
target/aarch64-apple-darwin/release/tide.tar.gz.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update-homebrew:
name: Update Homebrew Tap
needs: build
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: mislav/bump-homebrew-formula-action@v3
with:
formula-name: tide
formula-path: Formula/tide.rb
homebrew-tap: BreathCodeFlow/homebrew-tap
base-branch: main
download-url: https://github.com/BreathCodeFlow/tide/releases/download/${{ github.ref_name }}/tide.tar.gz
commit-message: |
{{formulaName}} {{version}}
Created by https://github.com/mislav/bump-homebrew-formula-action