-
Notifications
You must be signed in to change notification settings - Fork 9
82 lines (71 loc) · 2.13 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Release
permissions:
contents: write
on:
push:
tags:
- v[0-9]+.*
env:
CARGO_TERM_COLOR: always
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/create-gh-release-action@v1
with:
changelog: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
upload-assets:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkingout Repo
uses: actions/checkout@v3
- name: Setting Nightly Rust Toolchain
uses: actions-rs/[email protected]
with:
profile: minimal
toolchain: nightly
override: true
- name: Building Linux Binaries and Uploading to Releases
if: matrix.os == 'ubuntu-latest'
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: zeronet
include: CHANGELOG.md,LICENSE.md,README.md,assets
archive: ZeroNetX-linux-x64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Building Mac OS Binaries and Uploading to Releases
if: matrix.os == 'macos-latest'
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: zeronet
include: CHANGELOG.md,LICENSE.md,README.md,assets
archive: ZeroNetX-mac-x64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Building Windows Binaries and Uploading to Releases
if: matrix.os == 'windows-latest'
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: zeronet
include: CHANGELOG.md,LICENSE.md,README.md,assets
archive: ZeroNetX-windows-x64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Saving Artifact to Cache
uses: Swatinem/[email protected]
with:
key: ${{ matrix.os }}