-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (46 loc) · 1.41 KB
/
release.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
44
45
46
47
48
49
50
51
52
53
54
55
56
on:
release:
types: [published, edited]
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64-unknown-linux-gnu]
steps:
- name: Rustup setup
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
target: ${{ matrix.target }}
- uses: actions/checkout@v3
- name: Build release
run: |
cargo build --release --target ${{ matrix.target }}
- name: Get release upload url
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url}}
asset_path: ./target/${{ matrix.target }}/release/jinko
asset_name: jinko-${{ steps.get_release.outputs.tag_name }}-${{ matrix.target }}
asset_content_type: application/x-elf
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: "Publish jinko on crates.io"
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}