-
Notifications
You must be signed in to change notification settings - Fork 1
108 lines (84 loc) · 3.17 KB
/
ci.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
105
106
107
108
name: ci
on:
workflow_dispatch:
push:
pull_request:
schedule: [cron: "40 1 * * *"]
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
# 1.60
STEAMWORKS_COMMIT: e7bb839178fc5a48aa380d85e2ad04cc97d9d11c
jobs:
assign:
name: assign build_id
runs-on: ubuntu-latest
steps:
- run: wget https://github.com/trevyn/animal-time/releases/latest/download/animal-time
- run: chmod +x animal-time
- run: ./animal-time > build_id
- run: cat build_id
- uses: actions/upload-artifact@v4
with:
name: build_id
path: build_id
build:
needs: [assign]
name: build rust ${{ matrix.rust }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
rust: [nightly]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- run: cat build_id/build_id
- run: echo "BUILD_ID=$(cat build_id/build_id)" >> $GITHUB_ENV
- run: rustup default ${{ matrix.rust }} && rustup update ${{ matrix.rust }}
- run: sudo apt-get update && sudo apt-get install libgtk-3-dev libasound2-dev
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: cargo build --release
- run: ls
- run: ls
working-directory: target
- run: ls
working-directory: target/release
# - run: mv target/release/soto soto
# if: ${{ matrix.os != 'windows-latest' }}
- run: mv target/release/soto.exe Godottest.exe
if: ${{ matrix.os == 'windows-latest' }}
- uses: actions/upload-artifact@v4
if: ${{ matrix.rust == 'nightly' && matrix.os == 'windows-latest' }}
with:
name: Godottest
path: Godottest.exe
if-no-files-found: error
publish:
needs: [build]
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- run: curl -L -o steamworks.tar.gz https://github.com/rlabrecque/SteamworksSDK/archive/${{env.STEAMWORKS_COMMIT}}.tar.gz
- run: tar xzf steamworks.tar.gz SteamworksSDK-${{env.STEAMWORKS_COMMIT}}/redistributable_bin/win64/steam_api64.dll
- run: cp SteamworksSDK-${{env.STEAMWORKS_COMMIT}}/redistributable_bin/win64/steam_api64.dll Godottest/
- name: install steamcmd
run: |
echo steam steam/question select "I AGREE" | sudo debconf-set-selections
echo steam steam/license note '' | sudo debconf-set-selections
sudo add-apt-repository multiverse
sudo dpkg --add-architecture i386
sudo apt update
sudo apt-get install steamcmd
mkdir -p ~/Steam/config
- run: echo "${{ secrets.STEAM_CONFIG_VDF }}" | base64 -d > ~/Steam/config/config.vdf
- run: sed -i 's/STEAM_APP_ID/${{ secrets.STEAM_APP_ID }}/g' manifest.vdf
- run: sed -i 's/STEAM_DEPOT/${{ secrets.STEAM_DEPOT }}/g' manifest.vdf
- run: pwd
- run: ls
- run: ls Godottest
- run: steamcmd +login ${{ secrets.STEAM_USERNAME }} +run_app_build "$(pwd)/manifest.vdf" +quit