From 99c744426ac73124ed6c30492c0893f94f01305d Mon Sep 17 00:00:00 2001 From: MiszczuZPolski <71414303+MiszczuZPolski@users.noreply.github.com> Date: Thu, 30 Jan 2025 19:22:29 +0100 Subject: [PATCH] Update dev.yml 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 --- .github/workflows/dev.yml | 74 +++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 8399b225a..549d9ce6a 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -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 @@ -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 }}