From 25f37aa0eb321400c163dc159b64b9482487508e Mon Sep 17 00:00:00 2001 From: AndreasBrostrom Date: Sat, 31 Aug 2024 12:12:19 +0200 Subject: [PATCH 1/3] Added workflow for deploying on dev steam --- .github/workflows/arma.yml | 10 ++++++---- .github/workflows/deploy-publish.yml | 10 +++++----- resources/dev-description.txt | 4 ++++ resources/dev-payload.vdf | 10 ++++++++++ 4 files changed, 25 insertions(+), 9 deletions(-) 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/deploy-publish.yml b/.github/workflows/deploy-publish.yml index 2a4d9d8c..418303bc 100644 --- a/.github/workflows/deploy-publish.yml +++ b/.github/workflows/deploy-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 From 15e49edca4df4d60adc1703879488721e57fbf09 Mon Sep 17 00:00:00 2001 From: AndreasBrostrom Date: Sat, 31 Aug 2024 12:17:18 +0200 Subject: [PATCH 2/3] renamed and added names --- .github/workflows/build.yml | 3 ++- .github/workflows/{deploy-publish.yml => publish.yml} | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) rename .github/workflows/{deploy-publish.yml => publish.yml} (97%) 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 97% rename from .github/workflows/deploy-publish.yml rename to .github/workflows/publish.yml index 418303bc..a6e3392c 100644 --- a/.github/workflows/deploy-publish.yml +++ b/.github/workflows/publish.yml @@ -14,7 +14,7 @@ on: - live jobs: publish: - name: Publish to steam Workshop + name: Publish to steam workshop runs-on: windows-latest steps: - name: Checkout the source code From af9d558c1b6682a3839fa44ab745ed878ecc4e3e Mon Sep 17 00:00:00 2001 From: AndreasBrostrom Date: Sat, 31 Aug 2024 12:50:08 +0200 Subject: [PATCH 3/3] full path to payload --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a6e3392c..dc7b2198 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -45,7 +45,7 @@ jobs: - name: Deploy dev build to workshop if: ${{ inputs.environment == 'dev' }} run: | - steamcmd.exe +login $env:STEAM_USERNAME $env:STEAM_PASSWORD +workshop_build_item resources\dev-payload.vdf +quit + steamcmd.exe +login $env:STEAM_USERNAME $env:STEAM_PASSWORD +workshop_build_item D:\a\7CavAddon\7CavAddon\resources\dev-payload.vdf +quit env: ENVIRONMENT: ${{ inputs.environment }} \ No newline at end of file