Skip to content

Commit

Permalink
Update workflows like in Mission Framework
Browse files Browse the repository at this point in the history
  • Loading branch information
3Mydlo3 committed Dec 18, 2024
1 parent 9534fa0 commit ed55441
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 62 deletions.
21 changes: 3 additions & 18 deletions .github/workflows/arma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,8 @@ jobs:
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
run: hemtt build

build:
runs-on: windows-2022
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Pull Arma3Tools
run: |
echo ${{ secrets.CR_PAT }} | docker login -u ${{ secrets.CR_USER }} --password-stdin ghcr.io
docker pull ghcr.io/armaforces/arma3tools:v2
- name: Build using HEMTT
run: |
docker run -v "$(pwd):c:/workdir" -e CI=$True ghcr.io/armaforces/arma3tools:v2 hemtt release
- uses: actions/upload-artifact@v4
with:
name: armaforces_wargame
path: |
releases/*.zip
!releases/afwg-latest.zip
name: afwg_${{ github.sha }}-nobin
path: .hemttout/@*
include-hidden-files: true # Because .hemttout is a hidden directory
51 changes: 7 additions & 44 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,64 +7,27 @@ on:

jobs:
build_addon:
runs-on: windows-2022
steps:
- name: Set VERSION env
run: echo VERSION=${GITHUB_REF:11} >> $GITHUB_ENV

- uses: actions/checkout@v2

- name: Pull Arma3Tools
run: |
echo ${{ secrets.CR_PAT }} | docker login -u ${{ secrets.CR_USER }} --password-stdin ghcr.io
docker pull ghcr.io/armaforces/arma3tools:v2
- name: Build using HEMTT
run: |
docker run -v "$(pwd):c:/workdir" -e CI=$True ghcr.io/armaforces/arma3tools:v2 hemtt release
- uses: actions/upload-artifact@v2
with:
name: hemttout
path: .hemttout/
if-no-files-found: error
retention-days: 1

- uses: actions/upload-artifact@v2
with:
name: releases
path: releases/
if-no-files-found: error
retention-days: 7

release_addon:
runs-on: ubuntu-latest
needs: build_addon
steps:
- uses: actions/checkout@v4
- name: Set VERSION env
run: echo VERSION=${GITHUB_REF:11} >> $GITHUB_ENV

- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT release
run: hemtt release
# Upload to GitHub
- uses: actions/download-artifact@v2
with:
name: releases
path: releases
- uses: softprops/action-gh-release@v1
with:
files: 'releases/afwg-${{ env.VERSION }}-*.zip'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Upload to Steam Workshop
- uses: actions/download-artifact@v2
with:
name: hemttout
path: .hemttout
- uses: arma-actions/workshop-upload@v1
with:
itemId: '1934142795' # Id of item to update
itemId: '2377030287' # Id of item to update
contentPath: '.hemttout/release'
changelog: 'https://github.com/ArmaForces/Wargame/releases/tag/v${{ env.VERSION }}'
changelog: 'https://github.com/ArmaForces/Arma-Wargame/releases/tag/v${{ env.VERSION }}'
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}

0 comments on commit ed55441

Please sign in to comment.