generated from loopystudios/bevy-shell-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (98 loc) · 2.97 KB
/
release-native.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: release-native
on:
push:
tags:
- "v*.*.*"
env:
RELEASE_NAME: my_game
PUBLIC_URL: /bevy-shell-template/
jobs:
setup:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version-tag.outputs.VERSION }}
steps:
- name: Get tagged version
id: version-tag
run: echo "::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}"
release-windows:
needs: setup
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build
run: |
cd ./launchers/native
cargo build --release
- name: Rename
run: |
mv ./target/release/native-launcher.exe ./${{ env.RELEASE_NAME }}.exe
- name: Zip release
uses: vimtor/action-zip@v1
with:
files: assets/ ./${{ env.RELEASE_NAME }}.exe
recursive: false
dest: ./${{ env.RELEASE_NAME }}-${{ needs.setup.outputs.version }}-windows.zip
- name: Upload
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
fail_on_unmatched_files: true
files: ./${{ env.RELEASE_NAME }}-${{ needs.setup.outputs.version }}-windows.zip
release-mac:
needs: setup
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build
run: |
cd ./launchers/native
cargo build --release
- name: Rename
run: |
mv ./target/release/native-launcher ./${{ env.RELEASE_NAME }}
- name: Zip release
uses: vimtor/action-zip@v1
with:
files: assets/ ./${{ env.RELEASE_NAME }}
recursive: false
dest: ./${{ env.RELEASE_NAME }}-${{ needs.setup.outputs.version }}-darwin.zip
- name: Upload
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
fail_on_unmatched_files: true
files: ./${{ env.RELEASE_NAME }}-${{ needs.setup.outputs.version }}-darwin.zip
release-ubuntu:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get dependencies
run: |
sudo apt install libasound2-dev libudev-dev pkg-config
- name: Build
run: |
cd ./launchers/native
cargo build --release
- name: Rename
run: |
mv ./target/release/native-launcher ./${{ env.RELEASE_NAME }}
- name: Zip release
uses: vimtor/action-zip@v1
with:
files: assets/ ./${{ env.RELEASE_NAME }}
recursive: false
dest: ./${{ env.RELEASE_NAME }}-${{ needs.setup.outputs.version }}-ubuntu.zip
- name: Upload
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
fail_on_unmatched_files: true
files: ./${{ env.RELEASE_NAME }}-${{ needs.setup.outputs.version }}-ubuntu.zip