Skip to content

Commit d4c502b

Browse files
committed
feat: streamline macOS build process and update Homebrew formula action
1 parent 27fbf0c commit d4c502b

File tree

1 file changed

+18
-33
lines changed

1 file changed

+18
-33
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,7 @@ permissions:
1414
jobs:
1515
build:
1616
name: Build for macOS
17-
strategy:
18-
matrix:
19-
include:
20-
- target: x86_64-apple-darwin
21-
os: macos-13
22-
name: tide-x86_64-apple-darwin
23-
- target: aarch64-apple-darwin
24-
os: macos-14
25-
name: tide-aarch64-apple-darwin
26-
runs-on: ${{ matrix.os }}
17+
runs-on: macos-latest
2718
steps:
2819
- name: Checkout code
2920
uses: actions/checkout@v4
@@ -33,7 +24,7 @@ jobs:
3324
with:
3425
profile: minimal
3526
toolchain: stable
36-
target: ${{ matrix.target }}
27+
target: aarch64-apple-darwin
3728
override: true
3829

3930
- name: Cache cargo registry
@@ -55,20 +46,20 @@ jobs:
5546
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
5647

5748
- name: Build
58-
run: cargo build --release --target ${{ matrix.target }}
49+
run: cargo build --release --target aarch64-apple-darwin
5950

6051
- name: Create archive
6152
run: |
62-
cd target/${{ matrix.target }}/release
63-
tar czf ${{ matrix.name }}.tar.gz tide
64-
shasum -a 256 ${{ matrix.name }}.tar.gz > ${{ matrix.name }}.tar.gz.sha256
53+
cd target/aarch64-apple-darwin/release
54+
tar czf tide.tar.gz tide
55+
shasum -a 256 tide.tar.gz > tide.tar.gz.sha256
6556
6657
- name: Upload Release Assets
6758
uses: softprops/action-gh-release@v1
6859
with:
6960
files: |
70-
target/${{ matrix.target }}/release/${{ matrix.name }}.tar.gz
71-
target/${{ matrix.target }}/release/${{ matrix.name }}.tar.gz.sha256
61+
target/aarch64-apple-darwin/release/tide.tar.gz
62+
target/aarch64-apple-darwin/release/tide.tar.gz.sha256
7263
env:
7364
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7465

@@ -80,20 +71,14 @@ jobs:
8071
- name: Checkout code
8172
uses: actions/checkout@v4
8273

83-
- name: Update Homebrew formula
84-
uses: dawidd6/action-homebrew-bump-formula@v4
74+
- uses: mislav/bump-homebrew-formula-action@v3
8575
with:
86-
# Required, custom personal GitHub access token with only the 'public_repo' scope enabled
87-
token: ${{secrets.GITHUB_TOKEN}}
88-
# Optional, will commit with this user name
89-
user_name: BreathCodeFlow
90-
# Optional, will commit with this user email
91-
user_email: [email protected]
92-
# Bump all outdated formulae in this tap
93-
tap: BreathCodeFlow/homebrew-tap
94-
# Bump only these formulae if outdated
95-
formula: tide
96-
# Optional, if don't want to check for already open PRs
97-
force: true # true
98-
# Need to set this input if want to use `brew livecheck`
99-
livecheck: true
76+
formula-name: tide
77+
formula-path: Formula/tide.rb
78+
homebrew-tap: BreathCodeFlow/homebrew-tap
79+
base-branch: main
80+
download-url: https://github.com/BreathCodeFlow/tide/releases/download/${{ github.ref_name }}/tide.tar.gz
81+
commit-message: |
82+
{{formulaName}} {{version}}
83+
84+
Created by https://github.com/mislav/bump-homebrew-formula-action

0 commit comments

Comments
 (0)