-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 1.46 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
57
58
59
60
61
62
name: release
on:
push:
tags:
- '*'
jobs:
publish:
# define multiple targets
name: Publish for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
include:
- os: ubuntu-latest
executable: alias
asset_name: alias-linux
- os: windows-latest
executable: alias.exe
asset_name: alias-windows
- os: macos-latest
executable: alias
asset_name: alias-macos
# build
steps:
- name: checkout
uses: actions/checkout@v2
- name: enable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: build
run: cargo build --release
- name: Set enviroment for github-release
run: |
echo "RELEASE_TAG=$( echo ${GITHUB_REF##*/} )" >> $GITHUB_ENV
- name: create archive
uses: master-atul/[email protected]
with:
command: c
cwd: ./target/release/
files: |
${{ matrix.executable }}
outPath: target/release/${{ matrix.asset_name }}-${{ env.RELEASE_TAG }}.tar.gz
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
target/release/${{ matrix.asset_name }}-${{ env.RELEASE_TAG }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}