git: Added automatic pushing of nightlies to Steam (#801)

* build: Upload nightly releases to steam

* git: Fixed build CI syntax

* git: Try fixing steam login

* git: Try steam TOTP login

* git: Fix steam-deploy branch

* git: Don't upload MacOS No-GPU version to Steam

* git: Added commit hash to steam nightlies, only upload on our repo

* git: Use full commit hash in steam nightly description

* git: Fixed workflow

* git: Make sure macOS doesn't upload steam releases when it shouldn't

* git: Fix macos CI again

* git: Use steam-deploy fork to fix Linux deployment
This commit is contained in:
Nik 2022-10-27 13:19:06 +02:00 committed by GitHub
parent 32ab1c1a06
commit e567061e3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 64 additions and 0 deletions

View File

@ -120,6 +120,26 @@ jobs:
path: |
build/install/*
- name: 🗝️ Generate Steam TOTP
if: github.event_name == 'push' && github.repository == 'WerWolv/ImHex' && github.ref == 'refs/heads/master'
uses: CyberAndrii/steam-totp@v1
id: steam-totp
with:
shared_secret: ${{ secrets.STEAM_SHARED_SECRET }}
- name: 💨 Publish Steam Nightly
if: github.event_name == 'push' && github.repository == 'WerWolv/ImHex' && github.ref == 'refs/heads/master'
uses: WerWolv/steam-deploy@main
with:
username: ${{ secrets.STEAM_USERNAME }}
password: ${{ secrets.STEAM_PASSWORD }}
totp: ${{ steps.steam-totp.outputs.code }}
appId: 2186040
buildDescription: v${{ env.IMHEX_VERSION }} - ${{ github.sha }}
rootPath: build
depot1Path: install
releaseBranch: nightly
# MacOS build
macos:
runs-on: macos-11
@ -214,11 +234,13 @@ jobs:
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_OBJC_COMPILER_LAUNCHER=ccache \
-DCMAKE_OBJCXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_INSTALL_PREFIX="$PWD/install" \
-DIMHEX_PATTERNS_PULL_MASTER=ON \
-DCMAKE_OSX_DEPLOYMENT_TARGET="10.10" \
-DCPACK_PACKAGE_FILE_NAME="imhex-${{env.IMHEX_VERSION}}-macOS${{matrix.suffix}}" \
..
make -j4 package
make -j4 install
- name: ⬆️ Upload DMG
uses: actions/upload-artifact@v3
@ -226,6 +248,26 @@ jobs:
name: macOS DMG${{matrix.suffix}}
path: build/*.dmg
- name: 🗝️ Generate Steam TOTP
if: github.event_name == 'push' && github.repository == 'WerWolv/ImHex' && github.ref == 'refs/heads/master' && !matrix.custom_glfw
uses: CyberAndrii/steam-totp@v1
id: steam-totp
with:
shared_secret: ${{ secrets.STEAM_SHARED_SECRET }}
- name: 💨 Publish Steam Nightly
if: github.event_name == 'push' && github.repository == 'WerWolv/ImHex' && github.ref == 'refs/heads/master' && !matrix.custom_glfw
uses: WerWolv/steam-deploy@main
with:
username: ${{ secrets.STEAM_USERNAME }}
password: ${{ secrets.STEAM_PASSWORD }}
totp: ${{ steps.steam-totp.outputs.code }}
appId: 2186040
buildDescription: v${{ env.IMHEX_VERSION }} - ${{ github.sha }}
rootPath: build
depot2Path: install
releaseBranch: nightly
# Ubuntu build
ubuntu:
runs-on: ubuntu-22.04
@ -327,6 +369,8 @@ jobs:
export VERSION=${{env.IMHEX_VERSION}}
appimage-builder --recipe ../dist/AppImageBuilder.yml
cd ..
mkdir AppImage
find . -name "*.AppImage" -exec cp '{}' AppImage/ \;
#- name: ⬆️ Upload Flatpak
# uses: actions/upload-artifact@v3
@ -353,6 +397,26 @@ jobs:
name: Linux AppImage zsync
path: 'build-appimage/*.AppImage.zsync'
- name: 🗝️ Generate Steam TOTP
if: github.event_name == 'push' && github.repository == 'WerWolv/ImHex' && github.ref == 'refs/heads/master'
uses: CyberAndrii/steam-totp@v1
id: steam-totp
with:
shared_secret: ${{ secrets.STEAM_SHARED_SECRET }}
- name: 💨 Publish Steam Nightly
if: github.event_name == 'push' && github.repository == 'WerWolv/ImHex' && github.ref == 'refs/heads/master'
uses: WerWolv/steam-deploy@main
with:
username: ${{ secrets.STEAM_USERNAME }}
password: ${{ secrets.STEAM_PASSWORD }}
totp: ${{ steps.steam-totp.outputs.code }}
appId: 2186040
buildDescription: v${{ env.IMHEX_VERSION }} - ${{ github.sha }}
rootPath: AppImage
depot3Path: .
releaseBranch: nightly
# ArchLinux build
archlinux-build:
name: 🐧 ArchLinux