Skip to content

Commit

Permalink
Update dev.yml
Browse files Browse the repository at this point in the history
Update dev.yml

Update dev.yml

Update dev.yml

update runner

Update dev.yml

update changelog logic

yet another try

debug

move it higher

Update dev.yml

Update dev.yml

Update dev.yml

Update dev.yml

debug

Update dev.yml

Update dev.yml

delete debug

multiline string

Update dev.yml

Update dev.yml

Update dev.yml

Update dev.yml

Update dev.yml

Update dev.yml
  • Loading branch information
MiszczuZPolski committed Jan 30, 2025
1 parent 0f95474 commit 99c7444
Showing 1 changed file with 40 additions and 34 deletions.
74 changes: 40 additions & 34 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ name: Dev Release
on:
workflow_dispatch:
schedule:
- cron : '0 0 * * *'
- cron: '0 0 * * *' # Runs every midnight UTC

jobs:
check:
runs-on: ubuntu-latest
outputs:
has-new-commits: ${{ steps.check-new-commits.outputs.has-new-commits }}
new-commits-number: ${{ steps.check-new-commits.outputs.new-commits-number }}
steps:
- name: Check if there are any new commits
id: check-new-commits
Expand All @@ -16,39 +19,42 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
seconds: 86400
branch: 'dev-Tomcat'

release:
runs-on: windows-latest
runs-on: ubuntu-latest
needs: check
if: needs.check.outputs.has-new-commits == 'true'
steps:
- name: Print another thing if new commits couldn't be found
if: ${{ steps.check-new-commits.outputs.has-new-commits != 'true' }}
run: echo "You don't have new commits 🛑!" && exit 0
- name: Fetch merged PRs
if: ${{ steps.check_commits.outputs.has-new-commits == 'true' }}
run: |
echo "Recent merged PRs/commits:" > merged_prs.txt
git log --merges --pretty=format:"- %s by @%an" -n ${{ steps.check_commits.outputs.new-commits-number }} >> merged_prs.txt
shell: bash
- name: Install Arma 3 Tools
uses: arma-actions/arma3-tools@master
with:
toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }}
- name: Checkout the source code
uses: actions/checkout@v4
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Run HEMTT release
run: hemtt release
- name: Rename release folder
run: mv .hemttout/release .hemttout/@kat
- name: Update to Steam Workshop (dev)
uses: arma-actions/workshop-upload@v1
with:
itemId: '2841189207'
contentPath: '.hemttout/@kat'
changelog: |
Merged Pull Requests:
$(cat merged_prs.txt)
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
- name: Checkout the source code
uses: actions/checkout@v4

- name: Fetch merged PRs
run: |
git log --pretty=format:"%s by %an" -n 20 --no-merges > merged_prs.txt
PR_LIST=$(cat merged_prs.txt)
echo "{MERGED_PRS}={PR_LIST}" >> $GITHUB_ENV
shell: bash

- name: Install Arma 3 Tools
uses: arma-actions/arma3-tools@master
with:
toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }}

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

- name: Run HEMTT release
run: hemtt release

- name: Rename release folder
run: mv .hemttout/release .hemttout/@kat

- name: Update to Steam Workshop (dev)
uses: arma-actions/workshop-upload@v1
with:
itemId: '2841189207'
contentPath: '.hemttout/@kat'
changelog: ${{ env.MERGED_PRS }}
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}

0 comments on commit 99c7444

Please sign in to comment.