From ed5544124f5e221ddd7dbfa88864776b254fbf13 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 22:36:14 +0100 Subject: [PATCH] Update workflows like in Mission Framework --- .github/workflows/arma.yml | 21 +++------------ .github/workflows/release.yml | 51 +++++------------------------------ 2 files changed, 10 insertions(+), 62 deletions(-) diff --git a/.github/workflows/arma.yml b/.github/workflows/arma.yml index e7db166..4a8467b 100644 --- a/.github/workflows/arma.yml +++ b/.github/workflows/arma.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c479ea3..07fb001 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }}