From 187ba093d5e00d86f40358e1caddbb4a6afadb0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brostr=C3=B6m=2EA=20=7C=20Evul?= Date: Sat, 31 Aug 2024 12:23:54 +0200 Subject: [PATCH] Added workflow for deploying on steamworkshop (#271) * Added workflow for deploying on dev steam * renamed and added names --- .github/workflows/arma.yml | 10 ++++++---- .github/workflows/build.yml | 3 ++- .github/workflows/{deploy-publish.yml => publish.yml} | 10 +++++----- resources/dev-description.txt | 4 ++++ resources/dev-payload.vdf | 10 ++++++++++ 5 files changed, 27 insertions(+), 10 deletions(-) rename .github/workflows/{deploy-publish.yml => publish.yml} (81%) create mode 100644 resources/dev-description.txt create mode 100644 resources/dev-payload.vdf diff --git a/.github/workflows/arma.yml b/.github/workflows/arma.yml index ffc15edf..613fb1e8 100644 --- a/.github/workflows/arma.yml +++ b/.github/workflows/arma.yml @@ -1,13 +1,13 @@ name: Testing - on: - push: - branches: - - main pull_request: + types: [opened, synchronize, ready_for_review] + push: + branches: main jobs: validate: + name: Validation runs-on: ubuntu-latest steps: - name: Checkout the source code @@ -29,6 +29,7 @@ jobs: # uses: arma-actions/bom-check@master lint: + name: Linting runs-on: ubuntu-latest steps: - name: Checkout the source code @@ -38,6 +39,7 @@ jobs: continue-on-error: true # No failure due to many false-positives hemtt: + name: HEMTT Check runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cdd9d67e..35ac7944 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build +name: Build and upload artifacts on: push: @@ -8,6 +8,7 @@ on: jobs: build: + name: Build runs-on: windows-latest steps: - name: Checkout the source code diff --git a/.github/workflows/deploy-publish.yml b/.github/workflows/publish.yml similarity index 81% rename from .github/workflows/deploy-publish.yml rename to .github/workflows/publish.yml index 2a4d9d8c..a6e3392c 100644 --- a/.github/workflows/deploy-publish.yml +++ b/.github/workflows/publish.yml @@ -5,7 +5,7 @@ on: workflow_dispatch: inputs: environment: - description: "Selected deploy enviroment" + description: "Selected deploy environment" required: true default: "dev" type: choice @@ -14,13 +14,15 @@ on: - live jobs: publish: + name: Publish to steam workshop runs-on: windows-latest steps: - name: Checkout the source code uses: actions/checkout@v4 - name: Setup HEMTT - if: ${{ inputs.environment == 'dev' }} uses: arma-actions/hemtt@v1 + - name: Setup steamcmd + uses: CyberAndrii/setup-steamcmd@v1 - name: Obtaining release if: ${{ inputs.environment == 'live' }} @@ -38,14 +40,12 @@ jobs: if: ${{ inputs.environment == 'dev' }} run: | hemtt build - Get-ChildItem -Path .hemttout\ -ErrorAction SilentlyContinue - Get-ChildItem -Path .release\ -ErrorAction SilentlyContinue env: ENVIRONMENT: ${{ inputs.environment }} - name: Deploy dev build to workshop if: ${{ inputs.environment == 'dev' }} run: | - Write-Host "Yey i did it!" + steamcmd.exe +login $env:STEAM_USERNAME $env:STEAM_PASSWORD +workshop_build_item resources\dev-payload.vdf +quit env: ENVIRONMENT: ${{ inputs.environment }} \ No newline at end of file diff --git a/resources/dev-description.txt b/resources/dev-description.txt new file mode 100644 index 00000000..1753f4e4 --- /dev/null +++ b/resources/dev-description.txt @@ -0,0 +1,4 @@ +[h1]7th Cavalry Gaming Community Addon Development Build[/h1] +This is the development and experimental build of the 7th Cavalry Gaming Community Addon or 7CavAddon for short. This build contain experimental features and or items and is not recomended to be used unless you know what your doing. + +To get the regular build go [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3298466460]here[/url]. \ No newline at end of file diff --git a/resources/dev-payload.vdf b/resources/dev-payload.vdf new file mode 100644 index 00000000..772bbe23 --- /dev/null +++ b/resources/dev-payload.vdf @@ -0,0 +1,10 @@ +"workshopitem" +{ + "appid" "107410" + "publishedfileid" "3298481411" + "contentfolder" "D:\\a\\7CavAddon\\7CavAddon\\.hemttout\\build" + "previewfile" "D:\\a\\7CavAddon\\7CavAddon\\resources\\steam_preview-dev.jpg" + "title" "7CavAddon DevBuild [7CAV]" + "description" "" + "changenote" "" +} \ No newline at end of file