-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (52 loc) · 1.7 KB
/
rust.yml
File metadata and controls
54 lines (52 loc) · 1.7 KB
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
44
45
46
47
48
49
50
51
52
53
54
# .github/workflows/release.yml
on:
push
jobs:
build:
permissions: write-all
name: build ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [x86_64-unknown-linux-musl]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-unknown-linux-musl
default: true
- name: get cargo musl-tools
run: sudo apt-get install musl-tools
- name: get musl target
run: rustup target add x86_64-unknown-linux-musl
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features --target x86_64-unknown-linux-musl
- run: ls */
- run: rustc --print target-list
- name:
Create zip file
run: zip -r rust-frog-api.zip target/x86_64-unknown-linux-musl/release/frog-api
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.run_id }}-${{ github.run_attempt }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload App
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: rust-frog-api.zip
asset_name: rust-frog-api.zip
asset_content_type: application/zip