-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (64 loc) · 2.54 KB
/
game_msi.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
name: Game Installer
on:
push:
branches: [master]
jobs:
bundle:
strategy:
matrix:
os:
- name: ubuntu-latest
artifact: target/**/*.deb
- name: macos-latest
artifact: "*.tar"
- name: macos-13
artifact: "*.tar"
runs-on: ${{matrix.os.name}}
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo install --git https://github.com/burtonageo/cargo-bundle
- name: Install Packages
if: ${{ matrix.os.name == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install -y libasound2-dev libsoundtouch-dev libegl1-mesa-dev libfreetype6-dev zlib1g-dev libgtk-3-dev libudev-dev
- run: cargo bundle --release
- run: cargo bundle --release --bin kson-editor
- run: tar --strip-components 4 -cvf ${{ runner.os }}-${{ runner.arch }}.tar target/release/bundle/osx
if: ${{ runner.os == 'macOS' }}
- name: Upload to R2
working-directory: ${{ github.workspace }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_API_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_API_TOKEN }}
AWS_DEFAULT_REGION: weur
run: aws s3 sync . s3://${{ secrets.R2_BUCKET }}/${{ github.ref_name }} --endpoint-url ${{ secrets.S3_ENDPOINT }} --exclude "*" --include "*.tar" --include "*.deb"
continue-on-error: true
- uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-${{ runner.arch }}-Bundle
path: ${{ matrix.os.artifact }}
windows_installer:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo install cargo-wix
- run: cargo wix -p rusc --nocapture
- name: Upload to R2
working-directory: ${{ github.workspace }}/target/wix
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_API_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_API_TOKEN }}
AWS_DEFAULT_REGION: weur
run: aws s3 sync . s3://${{ secrets.R2_BUCKET }}/${{ github.ref_name }} --endpoint-url ${{ secrets.S3_ENDPOINT }} --exclude "*" --include "*.msi"
continue-on-error: true
- uses: actions/upload-artifact@v3
with:
name: Windows installer
path: target/**/*.msi