autodeploy to steam on tag

develop
Myk Taylor 2023-08-01 00:11:46 -07:00
parent a299f0b5fb
commit 69986a4bf7
No known key found for this signature in database
2 changed files with 18 additions and 10 deletions

@ -4,10 +4,11 @@ on:
push: push:
tags: tags:
- '*-r[0-9]+' - '*-r[0-9]+'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
tag: ref:
description: tag description: Tag
required: true required: true
jobs: jobs:
@ -16,7 +17,7 @@ jobs:
uses: ./.github/workflows/build-windows.yml uses: ./.github/workflows/build-windows.yml
with: with:
artifact-name: win64-release artifact-name: win64-release
ref: ${{ github.event.inputs.tag }} ref: ${{ github.event.inputs && github.event.inputs.ref || github.event.ref }}
cache-id: release cache-id: release
cache-readonly: true cache-readonly: true
stonesense: true stonesense: true
@ -29,7 +30,7 @@ jobs:
uses: ./.github/workflows/build-linux.yml uses: ./.github/workflows/build-linux.yml
with: with:
artifact-name: linux64-release artifact-name: linux64-release
ref: ${{ github.event.inputs.tag }} ref: ${{ github.event.inputs && github.event.inputs.ref || github.event.ref }}
cache-id: release cache-id: release
cache-readonly: true cache-readonly: true
stonesense: true stonesense: true
@ -48,7 +49,7 @@ jobs:
- name: Clone DFHack - name: Clone DFHack
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
ref: ${{ github.event.inputs.tag }} ref: ${{ github.event.inputs && github.event.inputs.ref || github.event.ref }}
submodules: true submodules: true
- name: Get tag - name: Get tag
id: gettag id: gettag

@ -1,6 +1,10 @@
name: Deploy to Steam name: Deploy to Steam
on: on:
push:
tags:
- '*'
workflow_dispatch: workflow_dispatch:
inputs: inputs:
ref: ref:
@ -24,7 +28,7 @@ jobs:
uses: ./.github/workflows/build-linux.yml uses: ./.github/workflows/build-linux.yml
with: with:
artifact-name: common-depot artifact-name: common-depot
ref: ${{ github.event.inputs.ref }} ref: ${{ github.event.inputs && github.event.inputs.ref || github.event.ref }}
platform-files: false platform-files: false
docs: true docs: true
stonesense: true stonesense: true
@ -35,7 +39,7 @@ jobs:
uses: ./.github/workflows/build-windows.yml uses: ./.github/workflows/build-windows.yml
with: with:
artifact-name: win64-depot artifact-name: win64-depot
ref: ${{ github.event.inputs.ref }} ref: ${{ github.event.inputs && github.event.inputs.ref || github.event.ref }}
cache-id: release cache-id: release
cache-readonly: true cache-readonly: true
common-files: false common-files: false
@ -47,7 +51,7 @@ jobs:
uses: ./.github/workflows/build-linux.yml uses: ./.github/workflows/build-linux.yml
with: with:
artifact-name: linux64-depot artifact-name: linux64-depot
ref: ${{ github.event.inputs.ref }} ref: ${{ github.event.inputs && github.event.inputs.ref || github.event.ref }}
cache-id: release cache-id: release
cache-readonly: true cache-readonly: true
common-files: false common-files: false
@ -61,7 +65,10 @@ jobs:
- depot-win64 - depot-win64
- depot-linux64 - depot-linux64
runs-on: ubuntu-latest runs-on: ubuntu-latest
concurrency: steam
steps: steps:
- name: Set env
run: echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Stage common depot files - name: Stage common depot files
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
@ -83,9 +90,9 @@ jobs:
username: ${{ secrets.STEAM_USERNAME }} username: ${{ secrets.STEAM_USERNAME }}
configVdf: ${{ secrets.STEAM_CONFIG_VDF}} configVdf: ${{ secrets.STEAM_CONFIG_VDF}}
appId: 2346660 appId: 2346660
buildDescription: ${{ github.event.inputs.version }} buildDescription: ${{ github.event.inputs && github.event.inputs.version || env.TAG }}
rootPath: . rootPath: .
depot1Path: common depot1Path: common
depot2Path: win64 depot2Path: win64
depot3Path: linux64 depot3Path: linux64
releaseBranch: ${{ github.event.inputs.release_channel }} releaseBranch: ${{ github.event.inputs && github.event.inputs.release_channel || 'staging' }}