Skip to content

Commit 6dbbd9f

Browse files
committed
test
1 parent 4a0042d commit 6dbbd9f

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/action.yml

+59
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,62 @@ jobs:
3636

3737
- name: Build
3838
run: cargo build --verbose
39+
40+
build:
41+
needs: quick-tests
42+
runs-on: ${{ matrix.os }}
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
include:
47+
- os: macos-latest
48+
TARGET: aarch64-apple-darwin
49+
50+
- os: macos-latest
51+
TARGET: x86_64-apple-darwin
52+
53+
- os: ubuntu-latest
54+
TARGET: arm-unknown-linux-musleabihf
55+
56+
- os: ubuntu-latest
57+
TARGET: aarch64-unknown-linux-musl
58+
59+
- os: ubuntu-latest
60+
TARGET: armv7-unknown-linux-musleabihf
61+
62+
- os: ubuntu-latest
63+
TARGET: x86_64-unknown-linux-musl
64+
65+
- os: windows-latest
66+
TARGET: x86_64-pc-windows-msvc
67+
EXTENSION: .exe
68+
69+
steps:
70+
- name: Building ${{ matrix.TARGET }}
71+
run: echo "${{ matrix.TARGET }}"
72+
73+
- uses: actions/checkout@master
74+
- name: Build
75+
uses: houseabsolute/actions-rust-cross@v0
76+
with:
77+
target: ${{ matrix.TARGET }}
78+
args: "--release"
79+
80+
- name: Rename
81+
run: cp target/${{ matrix.TARGET }}/release/${{ github.event.repository.name }}${{ matrix.EXTENSION }} ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
82+
83+
- uses: actions/upload-artifact@master
84+
with:
85+
name: ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
86+
path: ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
87+
88+
- uses: svenstaro/upload-release-action@v2
89+
name: Upload binaries to release
90+
if: ${{ github.event_name == 'push' }}
91+
with:
92+
repo_token: ${{ secrets.GITHUB_TOKEN }}
93+
file: ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
94+
asset_name: ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
95+
tag: ${{ github.ref }}
96+
prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }}
97+
overwrite: true

0 commit comments

Comments
 (0)