-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (80 loc) · 2.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Make release when version tag is pushed
on:
push:
tags:
- v*
jobs:
build-windows:
name: Build and Upload Windows Artifact
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable
- name: Check Cache
uses: Swatinem/rust-cache@v2
- name: Build Windows Release
run: cargo build --release
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: windows-binary
path: target/release/hypnagogic-cli.exe
build-linux:
name: Build and Upload Linux Artifact
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable
- name: Check Cache
uses: Swatinem/rust-cache@v2
- name: Build Linux Release
run: cargo build --release
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: linux-binary
path: target/release/hypnagogic-cli
zip-and-publish:
name: Create bundles and publish release
runs-on: ubuntu-latest
needs: [build-windows, build-linux]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Create Output Folder
run: |
mkdir artifacts
- name: Download windows Artifact
uses: actions/download-artifact@v3
with:
name: windows-binary
path: artifacts
- name: Download Linux Artifact
uses: actions/download-artifact@v3
with:
name: linux-binary
path: artifacts
- name: Copy to release artifact dir
run: |
mv artifacts/hypnagogic-cli artifacts/hypnagogic
mv artifacts/hypnagogic-cli.exe artifacts/hypnagogic.exe
cp -r examples artifacts/examples
cp -r templates artifacts/templates
cp README.md artifacts/README.md
cp LICENSE.md artifacts/LICENSE.md
- name: Zip Release Artifacts
uses: vimtor/action-zip@v1
with:
files: artifacts/
dest: hypnagogic-full-package.zip
- name: Publish Release
uses: softprops/action-gh-release@v1
with:
files: |
hypnagogic-full-package.zip
artifacts/hypnagogic
artifacts/hypnagogic.exe