Skip to content

Commit

Permalink
Merge branch 'main' into CSC-Rework
Browse files Browse the repository at this point in the history
  • Loading branch information
OverlordZorn authored Nov 4, 2024
2 parents fb0090f + 7773955 commit d5755ab
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 7 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Merge Version Bump

on:
pull_request:
types:
- closed

permissions:
contents: write

jobs:
if_merged:
name: Post_Merged
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT build
run: hemtt script update_2_patch
- name: Commit to Repo
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "[CI] Merge Version Bump"
git push
37 changes: 31 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# This action will use hemtt release to build the mod folder which then will be uploaded to the provided steam workshop page
#
# Pre-Requisites
# - Mod needs to be already on the Workshop
# - Steam Account that owns Arma and needs to be a contributer to the workshop item.
# -- It is recommended to use a dedicated Steam Account with 2FA disabled.
#
# How to use
#
# 1. Update the FOLDER Variable and remove the #
# 2. Update the WORKSHOP ID Variable and remove the #
# 3. Add STEAM_USERNAME as github repo secret
# 4. Add STEAM_PASSWORD as github repo secret

name: Release

env:
FOLDER: '@cvo_aux'
WORKSHOPID: '3037257908'

on:
release:
types: released
Expand All @@ -13,32 +31,39 @@ jobs:
steps:
- name: Set VERSION env
run: echo VERSION=${GITHUB_REF:11} >> $GITHUB_ENV

- name: Checkout the source code
uses: actions/checkout@v2

- name: Setup HEMTT
uses: arma-actions/hemtt@v1

- name: Run HEMTT build
run: hemtt release --no-archive

- name: Move release to releases folder
run:
version="${{ github.event.release.tag_name }}"
mv .hemttout/release "@cvo_aux-${{ env.VERSION }}"
mv .hemttout/release "${{ env.FOLDER }}-${{ env.VERSION }}"

- name: Zip release
run: zip -r "@cvo_aux-${{ env.VERSION }}.zip" ./@cvo_aux-${{ env.VERSION }}
run: zip -r "${{ env.FOLDER }}-${{ env.VERSION }}.zip" ./${{ env.FOLDER }}-${{ env.VERSION }}

- name: Update Release with Files
uses: softprops/action-gh-release@v1
with:
files: ./@cvo_aux-${{ env.VERSION }}.zip
files: ./${{ env.FOLDER }}-${{ env.VERSION }}.zip
draft: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update to Steam Workshop (stable)
uses: arma-actions/workshop-upload@v1
with:
itemId: '3037257908'
contentPath: './@cvo_aux-${{ env.VERSION }}'
itemId: ${{ env.WORKSHOPID }}
contentPath: './${{ env.FOLDER }}-${{ env.VERSION }}'
changelog: |
https://github.com/OverlordZorn/CVO-Auxiliary/releases/tag/v${{ env.VERSION }}
https://github.com/${{ github.repository }}/releases/tag/v${{ env.VERSION }}
${{ github.event.release.body }}
env:
Expand Down
1 change: 0 additions & 1 deletion .hemtt/scripts/update_2_patch.rhai
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ let next = current + 1;

script_version.replace(prefix + current.to_string(), prefix + next.to_string());


// Write the modified contents to script_version.hpp
HEMTT_RFS.join("addons")
.join("main")
Expand Down

0 comments on commit d5755ab

Please sign in to comment.