-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (74 loc) · 2.21 KB
/
release.yaml
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
67
68
69
70
71
72
73
74
75
76
77
78
name: Release binaries for all platforms
on:
push:
tags:
- "v*"
jobs:
artifacts:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os:
- macos
- ubuntu
- windows
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt install libgtk-3-dev libxcb-present-dev
if: ${{ matrix.os == 'ubuntu' }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: build
args: --release
- uses: TheDoctor0/[email protected]
with:
directory: target
path: "release/forzanalyst release/forzanalyst.exe"
filename: forzanalyst-${{ matrix.os }}-${{ github.ref_name }}.zip
- uses: actions/upload-artifact@v2
with:
name: forzanalyst-${{ matrix.os }}-${{ github.ref_name }}.zip
path: target/forzanalyst-${{ matrix.os }}-${{ github.ref_name }}.zip
release:
runs-on: ubuntu-latest
needs: artifacts
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ForzAnalyst ${{ github.ref_name }}
draft: false
prerelease: false
add:
runs-on: ubuntu-latest
needs: [artifacts, release]
strategy:
matrix:
os:
- macos
- ubuntu
- windows
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: forzanalyst-${{ matrix.os }}-${{ github.ref_name }}.zip
- name: Upload Artifact to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ./forzanalyst-${{ matrix.os }}-${{ github.ref_name }}.zip
asset_name: forzanalyst-${{ matrix.os }}-${{ github.ref_name }}.zip
asset_content_type: application/zip