Steam Build and Deploy #3
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: Steam Build and Deploy | |
on: | |
workflow_run: | |
workflows: ["Unit Tests"] | |
types: [completed] | |
branches: [edge, prod] | |
jobs: | |
export-and-deploy-linux: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
name: Linux Build and Deploy | |
runs-on: ubuntu-20.04 | |
container: | |
image: barichello/godot-ci:4.3 | |
environment: Godot Dev Env | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Setup | |
run: | | |
mkdir -v -p ~/.config/ | |
mv /root/.config/godot ~/.config/godot | |
mkdir -v -p ~/.local/share/godot/export_templates/ | |
mv /root/.local/share/godot/export_templates/${{ vars.GODOT_VERSION }}.stable ~/.local/share/godot/export_templates/${{ vars.GODOT_VERSION }}.stable | |
- name: Initial Godot import | |
shell: bash | |
run: | | |
godot --quiet --editor --headless -s addons/bones/initial_import.gd || exit 0 | |
godot --editor --headless --quit || exit 0 | |
- name: Linux Build | |
run: | | |
mkdir -v -p dist/dothop-linux | |
godot --headless -v --export-debug Linux dist/dothop-linux/dothop.x86_64 || exit 0 | |
- name: Sanity check | |
run: | | |
ls -alh dist/ | |
ls -alh dist/dothop-linux | |
stat dist/dothop-linux/dothop.x86_64 | |
- uses: CyberAndrii/steam-totp@v1 | |
name: Generate TOTP | |
id: steam-totp | |
with: | |
shared_secret: ${{ secrets.STEAM_SHARED_SECRET }} | |
time_offset: 20 | |
- name: Deploy to Steam | |
uses: ./.github/actions/steam_deploy | |
env: | |
steam_username: ${{ secrets.STEAM_USERNAME }} | |
steam_password: ${{ secrets.STEAM_PASSWORD }} | |
steam_totp: ${{ steps.steam-totp.outputs.code }} |