Skip to content

Commit fb88d67

Browse files
committed
feat: update release workflow
1 parent e4029d3 commit fb88d67

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,32 @@ on: release
55
jobs:
66
generate:
77

8-
runs-on: ${{ matrix.os }}
8+
runs-on: ubuntu-latest
99

1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [windows-latest, macOS-latest, ubuntu-latest]
13+
target:
14+
- x86_64-pc-windows-gnu
15+
- x86_64-apple-darwin
16+
- x86_64-unknown-linux-gnu
1417

1518
steps:
16-
- name: Checkout the repository
17-
uses: actions/checkout@master
18-
- name: Generate artifacts
19-
run: cargo build --release
19+
- uses: actions/checkout@v1
20+
- uses: actions-rs/toolchain@v1
21+
with:
22+
toolchain: nightly
23+
target: ${{ matrix.target }}
24+
override: true
25+
- uses: actions-rs/cargo@v1
26+
with:
27+
use-cross: true
28+
command: build
29+
args: --release --target=${{ matrix.target }}
2030
- name: Rename artifacts
21-
run: |
22-
cp target/release/bridge target/release/bridge-${{ matrix.os }}
23-
shell: bash
24-
- name: Upload artifacts
25-
uses: skx/github-action-publish-binaries@master
31+
run: cp target/${{ matrix.target }}/release/bridge target/${{ matrix.target }}/release/bridge-${{ matrix.target }} || true
32+
- uses: skx/github-action-publish-binaries@master
2633
env:
2734
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
2835
with:
29-
args: 'target/release/bridge-*'
36+
args: 'target/${{ matrix.target }}/release/bridge*'

0 commit comments

Comments
 (0)