-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (53 loc) · 1.85 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Publish
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
BUILD_TYPE: Release
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build
run: cargo build --release --all-features --target-dir ${{github.workspace}}/${{github.ref_name}}/${{matrix.os}}
- name: Clean gid.d
continue-on-error: true
run: rm ${{github.workspace}}/${{github.ref_name}}/${{matrix.os}}/release/gid.d
- name: Clean gidc.d
continue-on-error: true
run: rm ${{github.workspace}}/${{github.ref_name}}/${{matrix.os}}/release/gidc.d
- name: Clean gid.pdb
continue-on-error: true
run: rm ${{github.workspace}}/${{github.ref_name}}/${{matrix.os}}/release/gid.pdb
- name: Clean gidc.pdb
continue-on-error: true
run: rm ${{github.workspace}}/${{github.ref_name}}/${{matrix.os}}/release/gidc.pdb
- name: Compress
run: 7z a -tzip ${{github.workspace}}/bin/gid-${{github.ref_name}}-${{matrix.os}}.zip ${{github.workspace}}/${{github.ref_name}}/${{matrix.os}}/release/gid*
- name: Upload
uses: actions/upload-artifact@v2
with:
name: gid-${{github.ref_name}}-${{matrix.os}}.zip
path: ${{github.workspace}}/bin/gid-${{github.ref_name}}-${{matrix.os}}.zip
publish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download
uses: actions/download-artifact@v2
with:
path: ${{github.workspace}}/bin
- name: Release
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
files: ${{github.workspace}}/bin/**/*.zip