ci #62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |