-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (43 loc) · 1.25 KB
/
publish.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
name: Publish
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
publish:
name: Publish for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
name: [macos, linux]
include:
- name: linux
os: ubuntu-latest
artifact_name: ikill
asset_name: ikill-linux-amd64
- name: macos
os: macos-latest
artifact_name: ikill
asset_name: ikill-macos-amd64
outputs:
app_version: ${{ env.APP_VERSION }}
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Get the release version from the tag
shell: bash
if: env.APP_VERSION == ''
run: |
echo "APP_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build
run: cargo build --release --locked
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}_${{ env.APP_VERSION }}
tag: ${{ github.ref }}