-
-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (41 loc) · 1.4 KB
/
publish_binaries.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
on:
release:
types:
- published
name: Publish binaries to release
jobs:
publish:
name: Publish for ${{ matrix.os }} ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
artifact_name: python-project
asset_name: python-project-generator-linux-amd64
target: x86_64-unknown-linux-gnu
- os: macos-latest
artifact_name: python-project
asset_name: python-project-generator-macos-amd64
target: x86_64-apple-darwin
- os: macos-latest
artifact_name: python-project
asset_name: python-project-generator-macos-aarch64
target: aarch64-apple-darwin
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Add target
run: rustup target add ${{ matrix.target }}
- name: Build
run: cargo build --release --locked --target ${{ matrix.target }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN}}
file: target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}