Skip to content

Commit

Permalink
Added workflow for deploying on steamworkshop (#271)
Browse files Browse the repository at this point in the history
* Added workflow for deploying on dev steam

* renamed and added names
  • Loading branch information
AndreasBrostrom authored Aug 31, 2024
1 parent 65d7fa1 commit 187ba09
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 10 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/arma.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -29,6 +29,7 @@ jobs:
# uses: arma-actions/bom-check@master

lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build and upload artifacts

on:
push:
Expand All @@ -8,6 +8,7 @@ on:

jobs:
build:
name: Build
runs-on: windows-latest
steps:
- name: Checkout the source code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
inputs:
environment:
description: "Selected deploy enviroment"
description: "Selected deploy environment"
required: true
default: "dev"
type: choice
Expand All @@ -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' }}
Expand All @@ -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 }}

4 changes: 4 additions & 0 deletions resources/dev-description.txt
Original file line number Diff line number Diff line change
@@ -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].
10 changes: 10 additions & 0 deletions resources/dev-payload.vdf
Original file line number Diff line number Diff line change
@@ -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" ""
}

0 comments on commit 187ba09

Please sign in to comment.