Skip to content

Commit 4beac62

Browse files
authored
Unify release workflows (#4192)
1 parent fd45665 commit 4beac62

File tree

2 files changed

+31
-26
lines changed

2 files changed

+31
-26
lines changed

.github/workflows/nightly_build.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,35 @@ jobs:
1515
include:
1616
- target: x86_64-unknown-linux-gnu
1717
os: ubuntu-latest
18+
binary_extension: ""
1819
- target: x86_64-apple-darwin
1920
os: macos-13
21+
binary_extension: ""
2022
- target: aarch64-apple-darwin
2123
os: macos-14
2224
- target: x86_64-pc-windows-msvc
2325
os: windows-latest
26+
binary_extension: ".exe"
2427
runs-on: ${{ matrix.os }}
2528
steps:
26-
- name: Check out the repository
27-
uses: actions/checkout@v4
28-
- name: Upload binaries to release
29-
uses: taiki-e/upload-rust-binary-action@v1
30-
with:
31-
bin: boa
32-
# We may be able to provide a custom archive name, but
33-
# currently just going with the example default.
34-
target: ${{ matrix.target }}
35-
archive: $bin-$tag-$target
36-
ref: refs/tags/nightly
37-
token: ${{ secrets.GITHUB_TOKEN }}
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
32+
- name: Install Rust toolchain
33+
uses: dtolnay/rust-toolchain@stable
34+
with:
35+
toolchain: stable
36+
targets: ${{ matrix.target }}
37+
38+
- name: Build
39+
run: cargo build --target ${{ matrix.target }} --release --locked --bin boa
40+
41+
- name: Upload binaries to release
42+
uses: svenstaro/upload-release-action@v2
43+
with:
44+
repo_token: ${{ secrets.GITHUB_TOKEN }}
45+
file: target/${{ matrix.target }}/release/boa${{ matrix.binary_extension }}
46+
asset_name: boa-${{ matrix.target }}${{ matrix.binary_extension }}
47+
tag: refs/tags/nightly
48+
overwrite: true
49+
prerelease: true

.github/workflows/release.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -86,28 +86,20 @@ jobs:
8686
include:
8787
- build: linux
8888
os: ubuntu-20.04
89-
rust: stable
9089
target: x86_64-unknown-linux-gnu
91-
asset_name: boa-linux-amd64
92-
binary_name: boa
90+
binary_extension: ""
9391
- build: macos-amd64
9492
os: macos-13
95-
rust: stable
9693
target: x86_64-apple-darwin
97-
asset_name: boa-macos-amd64
98-
binary_name: boa
94+
binary_extension: ""
9995
- build: macos-arm64
10096
os: macos-14
101-
rust: stable
10297
target: aarch64-apple-darwin
103-
asset_name: boa-macos-arm64
104-
binary_name: boa
98+
binary_extension: ""
10599
- build: win-msvc
106100
os: windows-2019
107-
rust: stable
108101
target: x86_64-pc-windows-msvc
109-
asset_name: boa-windows-amd64.exe
110-
binary_name: boa.exe
102+
binary_extension: ".exe"
111103
runs-on: ${{ matrix.os }}
112104
steps:
113105
- name: Checkout repository
@@ -121,10 +113,11 @@ jobs:
121113

122114
- name: Build
123115
run: cargo build --target ${{ matrix.target }} --verbose --release --locked --bin boa
116+
124117
- name: Upload binaries to release
125118
uses: svenstaro/upload-release-action@v2
126119
with:
127120
repo_token: ${{ secrets.GITHUB_TOKEN }}
128-
file: target/${{ matrix.target }}/release/${{ matrix.binary_name }}
129-
asset_name: ${{ matrix.asset_name }}
121+
file: target/${{ matrix.target }}/release/boa${{ matrix.binary_extension }}
122+
asset_name: boa-${{ matrix.target }}${{ matrix.binary_extension }}
130123
tag: ${{ github.ref }}

0 commit comments

Comments
 (0)