From a00f6cb0dad4473906d4447f78d0da6b3dff30a2 Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Tue, 13 Feb 2024 19:50:30 -0600 Subject: [PATCH 01/16] create testing release workflow --- .gitea/workflows/create-testing-snapshot.yaml | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .gitea/workflows/create-testing-snapshot.yaml diff --git a/.gitea/workflows/create-testing-snapshot.yaml b/.gitea/workflows/create-testing-snapshot.yaml new file mode 100644 index 0000000..c38d785 --- /dev/null +++ b/.gitea/workflows/create-testing-snapshot.yaml @@ -0,0 +1,54 @@ +name: Generate testing snapshot +on: + push: + branches: [main] + +jobs: + Clean: + name: Create testing release + runs-on: windows + steps: + - name: Checkout framework + uses: actions/checkout@v3 + with: + path: MissionFramework + + - name: Clean framework + run: | + Remove-Item -Recurse MissionFramework\aaFrameworkUtils + Remove-Item -Recurse MissionFramework\framework\x + Remove-Item -Recurse MissionFramework\.git* + + - name: Backup artifacts from runner + uses: actions/upload-artifact@v3 + with: + name: framework-test-snapshot + path: MissionFramework + + - name: Create archive + run: Compress-Archive MissionFramework framework-test-snapshot.zip + + - name: Delete old testing-release release + run: | + $headers = @{ + "accept" = "application/json" + "Authorization" = "token ${{secrets.RELEASE_TOKEN}}" + } + Invoke-WebRequest -Uri "https://gitea.iceberg-gaming.com/hizumi/MissionTemplate/releases/tags/testing-release" -Method Delete -Headers $headers + + - name: Delete old testing-release tag + run: | + $headers = @{ + "accept" = "application/json" + "Authorization" = "token ${{secrets.RELEASE_TOKEN}}" + } + Invoke-WebRequest -Uri "https://gitea.iceberg-gaming.com/hizumi/MissionTemplate/tags/testing-release" -Method Delete -Headers $headers + + - name: Create new testing-release + uses: https://gitea.com/actions/gitea-release-action@v1.1.6 + with: + tag_name: 'testing-release' + name: 'testing-release' + prerelease: true + files: |- + framework-test-snapshot.zip -- 2.37.3.windows.1 From f11cadbd0666a93d2d9677da6530a17f14028916 Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Tue, 13 Feb 2024 19:58:21 -0600 Subject: [PATCH 02/16] Update create-testing-snapshot.yaml correct api url --- .gitea/workflows/create-testing-snapshot.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/create-testing-snapshot.yaml b/.gitea/workflows/create-testing-snapshot.yaml index c38d785..5b7d666 100644 --- a/.gitea/workflows/create-testing-snapshot.yaml +++ b/.gitea/workflows/create-testing-snapshot.yaml @@ -34,7 +34,7 @@ jobs: "accept" = "application/json" "Authorization" = "token ${{secrets.RELEASE_TOKEN}}" } - Invoke-WebRequest -Uri "https://gitea.iceberg-gaming.com/hizumi/MissionTemplate/releases/tags/testing-release" -Method Delete -Headers $headers + Invoke-WebRequest -Uri "https://gitea.iceberg-gaming.com/api/v1/repos/hizumi/MissionTemplate/releases/tags/testing-release" -Method Delete -Headers $headers - name: Delete old testing-release tag run: | @@ -42,7 +42,7 @@ jobs: "accept" = "application/json" "Authorization" = "token ${{secrets.RELEASE_TOKEN}}" } - Invoke-WebRequest -Uri "https://gitea.iceberg-gaming.com/hizumi/MissionTemplate/tags/testing-release" -Method Delete -Headers $headers + Invoke-WebRequest -Uri "https://gitea.iceberg-gaming.com/api/v1/repos/hizumi/MissionTemplate/tags/testing-release" -Method Delete -Headers $headers - name: Create new testing-release uses: https://gitea.com/actions/gitea-release-action@v1.1.6 -- 2.37.3.windows.1 From 68f35a9b44697b7747496e53d916203bccf220f7 Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Tue, 13 Feb 2024 22:46:39 -0600 Subject: [PATCH 03/16] Update create-testing-snapshot.yaml add environment diagnostics and update webrequest url to use built in environment variables --- .gitea/workflows/create-testing-snapshot.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/create-testing-snapshot.yaml b/.gitea/workflows/create-testing-snapshot.yaml index 5b7d666..e919373 100644 --- a/.gitea/workflows/create-testing-snapshot.yaml +++ b/.gitea/workflows/create-testing-snapshot.yaml @@ -8,6 +8,14 @@ jobs: name: Create testing release runs-on: windows steps: + - name: Diagnostics + run: | + echo "repository: ${{ gitea.repository }}" + echo "ref: ${{ gitea.ref }}" + echo "ref_name: ${{ gitea.ref_name }}" + echo "api_url: ${{ gitea.api_url }}" + echo "workflow: ${{ gitea.workflow }}" + - name: Checkout framework uses: actions/checkout@v3 with: @@ -34,7 +42,7 @@ jobs: "accept" = "application/json" "Authorization" = "token ${{secrets.RELEASE_TOKEN}}" } - Invoke-WebRequest -Uri "https://gitea.iceberg-gaming.com/api/v1/repos/hizumi/MissionTemplate/releases/tags/testing-release" -Method Delete -Headers $headers + Invoke-WebRequest -Uri "${{ gitea.api_url }}/repos/${{ gitea.repository }}/releases/tags/testing-release" -Method Delete -Headers $headers - name: Delete old testing-release tag run: | @@ -42,7 +50,7 @@ jobs: "accept" = "application/json" "Authorization" = "token ${{secrets.RELEASE_TOKEN}}" } - Invoke-WebRequest -Uri "https://gitea.iceberg-gaming.com/api/v1/repos/hizumi/MissionTemplate/tags/testing-release" -Method Delete -Headers $headers + Invoke-WebRequest -Uri "${{ gitea.api_url }}/repos/${{ gitea.repository }}/tags/testing-release" -Method Delete -Headers $headers - name: Create new testing-release uses: https://gitea.com/actions/gitea-release-action@v1.1.6 -- 2.37.3.windows.1 From 8e10819b92eb883f25d28e0335d4d9b57d83c24b Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Wed, 14 Feb 2024 01:51:52 -0600 Subject: [PATCH 04/16] Update create-testing-snapshot.yaml --- .gitea/workflows/create-testing-snapshot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/create-testing-snapshot.yaml b/.gitea/workflows/create-testing-snapshot.yaml index e919373..97ab172 100644 --- a/.gitea/workflows/create-testing-snapshot.yaml +++ b/.gitea/workflows/create-testing-snapshot.yaml @@ -1,7 +1,7 @@ name: Generate testing snapshot on: push: - branches: [main] + branches: [develop] jobs: Clean: -- 2.37.3.windows.1 From 21dbb725acd373ae994f7d7d2b8ab76a13f1f805 Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Thu, 15 Feb 2024 18:40:13 -0600 Subject: [PATCH 05/16] sync develop workflow --- .gitea/workflows/create-testing-snapshot.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/create-testing-snapshot.yaml b/.gitea/workflows/create-testing-snapshot.yaml index 97ab172..5fb5877 100644 --- a/.gitea/workflows/create-testing-snapshot.yaml +++ b/.gitea/workflows/create-testing-snapshot.yaml @@ -13,6 +13,7 @@ jobs: echo "repository: ${{ gitea.repository }}" echo "ref: ${{ gitea.ref }}" echo "ref_name: ${{ gitea.ref_name }}" + echo "sha: ${{ gitea.sha }}" echo "api_url: ${{ gitea.api_url }}" echo "workflow: ${{ gitea.workflow }}" @@ -43,7 +44,7 @@ jobs: "Authorization" = "token ${{secrets.RELEASE_TOKEN}}" } Invoke-WebRequest -Uri "${{ gitea.api_url }}/repos/${{ gitea.repository }}/releases/tags/testing-release" -Method Delete -Headers $headers - + - name: Delete old testing-release tag run: | $headers = @{ @@ -51,7 +52,15 @@ jobs: "Authorization" = "token ${{secrets.RELEASE_TOKEN}}" } Invoke-WebRequest -Uri "${{ gitea.api_url }}/repos/${{ gitea.repository }}/tags/testing-release" -Method Delete -Headers $headers - + + - name: Create new testing-release tag + run: | + $headers = @{ + "accept" = "application/json" + "Authorization" = "token ${{secrets.RELEASE_TOKEN}}" + } + Invoke-WebRequest -Uri "${{ gitea.api_url }}/repos/${{ gitea.repository }}/tags" -Method Post -Headers $headers -ContentType "application/json" -Body "{`"message`": `"testing-release`", `"tag_name`": `"testing-release`", `"target`": `"${{ gitea.sha }}`"}" + - name: Create new testing-release uses: https://gitea.com/actions/gitea-release-action@v1.1.6 with: -- 2.37.3.windows.1 From 72bac32219b4a5aa0cf75dca983421745875925b Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Thu, 15 Feb 2024 18:40:28 -0600 Subject: [PATCH 06/16] create release workflow --- .gitea/workflows/pack-zgm-pbo-files.yaml | 96 ++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 .gitea/workflows/pack-zgm-pbo-files.yaml diff --git a/.gitea/workflows/pack-zgm-pbo-files.yaml b/.gitea/workflows/pack-zgm-pbo-files.yaml new file mode 100644 index 0000000..8a47ed1 --- /dev/null +++ b/.gitea/workflows/pack-zgm-pbo-files.yaml @@ -0,0 +1,96 @@ +name: Pack ZGM mission PBO files +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: + release: + branches: [main] + +jobs: + GetMissionList: + runs-on: windows + steps: + - name: Checkout missions + uses: actions/checkout@v3 + with: + repository: 17th-Ranger-Battalion-ORG/MissionsForZGM + fetch-depth: 0 + ref: 'main' + token: ${{ secrets.READ_TOKEN }} + path: template + + - name: Get mission list + run: | + Get-ChildItem missions/* + + - name: Current Directory + run: | + Get-Location + + CreatePboFiles: + runs-on: windows + steps: + - name: Checkout template + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: 'main' + token: ${{ secrets.READ_TOKEN }} + path: template + + - name: Prepare template + run: | + Remove-Item -Recurse template\aaFrameworkUtils + Remove-Item -Recurse template\framework\x + Remove-Item -Recurse template\.git* + + - name: Checkout missions + uses: actions/checkout@v3 + with: + repository: 17th-Ranger-Battalion-ORG/MissionsForZGM + fetch-depth: 0 + ref: 'main' + token: ${{ secrets.READ_TOKEN }} + path: zgm-files + + - name: Prepare tools + run: mkdir packed-files + + - name: Pack PBOs + run: | + $date = Get-Date -Format "yyyy-MM-dd" + foreach ($file in Get-ChildItem missions) { + $map = (Get-Item zgm-files\missions\$file).Basename.split('\.')[-1] + Copy-Item zgm-files\missions\$file\mission.sqm template\ + (Get-Content .\template\mission_settings.hpp).Replace("MISSION AUTHOR","17th Ranger Battalion") | Set-Content .\template\mission_settings.hpp + (Get-Content .\template\mission_settings.hpp).Replace("THIS APPEARS ON TOP OF THE LOADING SCREEN IMAGE","GAME MASTER") | Set-Content .\template\mission_settings.hpp + (Get-Content .\template\mission_settings.hpp).Replace("THIS APPEARS BELOW THE LOADING SCREEN IMAGE","Forcing you to respawn since 2013") | Set-Content .\template\mission_settings.hpp + (Get-Content .\template\mission_settings.hpp).Replace("THIS IS THE NAME ON THE #MISSIONS LIST","BASE ZGM $date") | Set-Content .\template\mission_settings.hpp + (Get-Content .\template\mission_settings.hpp).Replace("THIS IS WHERE YOU DESCRIBE THE MISSION IN THE #MISSION LIST","I have 2 headless clients, and am most likely an airfield spawn") | Set-Content .\template\mission_settings.hpp + (Get-Content .\template\mission_settings.hpp).Replace("MY SERIES NAME","ZEUS GAME MASTER") | Set-Content .\template\mission_settings.hpp + + $missionName = Get-Content .\template\mission.sqm | Select-String -Pattern 'sourceName="(.*)";' + $missionName = $missionName.Matches.groups[1].value + (Get-Content .\template\mission.sqm).Replace($missionName,"FRAMEWORK ZGM $date") | Set-Content .\template\mission.sqm + + zgm-files\tools\PBOconsole.exe -pack template packed-files\mission.$map.pbo + } + + - name: List PBOs + run: | + cd packed-files + Get-ChildItem + + - name: Backup artifacts from runner + uses: actions/upload-artifact@v3 + with: + name: zgm-pbo-files + path: packed-files/* + + - name: Create release + uses: https://gitea.com/actions/gitea-release-action@v1.1.6 + with: + tag_name: 'snapshot-release' + release_name: 'snapshot-release' + files: |- + packed-files/** + api_key: '${{secrets.RELEASE_TOKEN}}' + -- 2.37.3.windows.1 From ddf0fe91d492642bfa35103cd3c078a99ec02e2c Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Thu, 15 Feb 2024 18:46:51 -0600 Subject: [PATCH 07/16] Update pack-zgm-pbo-files.yaml --- .gitea/workflows/pack-zgm-pbo-files.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/pack-zgm-pbo-files.yaml b/.gitea/workflows/pack-zgm-pbo-files.yaml index 8a47ed1..4178311 100644 --- a/.gitea/workflows/pack-zgm-pbo-files.yaml +++ b/.gitea/workflows/pack-zgm-pbo-files.yaml @@ -2,6 +2,7 @@ name: Pack ZGM mission PBO files run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 on: release: + types: [published] branches: [main] jobs: -- 2.37.3.windows.1 From 4976aa51b8ffa518b0d41f205c3e926ce6fd8a5c Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Thu, 15 Feb 2024 18:47:30 -0600 Subject: [PATCH 08/16] Update pack-zgm-pbo-files.yaml --- .gitea/workflows/pack-zgm-pbo-files.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/pack-zgm-pbo-files.yaml b/.gitea/workflows/pack-zgm-pbo-files.yaml index 4178311..7995982 100644 --- a/.gitea/workflows/pack-zgm-pbo-files.yaml +++ b/.gitea/workflows/pack-zgm-pbo-files.yaml @@ -2,8 +2,7 @@ name: Pack ZGM mission PBO files run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 on: release: - types: [published] - branches: [main] + types: [published] jobs: GetMissionList: -- 2.37.3.windows.1 From 2218898ff7887e7a4355bcc4ea4f971a82a954c7 Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Thu, 15 Feb 2024 18:49:36 -0600 Subject: [PATCH 09/16] Update pack-zgm-pbo-files.yaml --- .gitea/workflows/pack-zgm-pbo-files.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/pack-zgm-pbo-files.yaml b/.gitea/workflows/pack-zgm-pbo-files.yaml index 7995982..3064c97 100644 --- a/.gitea/workflows/pack-zgm-pbo-files.yaml +++ b/.gitea/workflows/pack-zgm-pbo-files.yaml @@ -1,8 +1,8 @@ name: Pack ZGM mission PBO files run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 on: - release: - types: [published] + push: + branches: [main] jobs: GetMissionList: -- 2.37.3.windows.1 From d25e67182a7a0ca6bccae3b89a33e4aa61e9cc5a Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Thu, 15 Feb 2024 18:50:30 -0600 Subject: [PATCH 10/16] Update pack-zgm-pbo-files.yaml --- .gitea/workflows/pack-zgm-pbo-files.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/pack-zgm-pbo-files.yaml b/.gitea/workflows/pack-zgm-pbo-files.yaml index 3064c97..e6cb2bf 100644 --- a/.gitea/workflows/pack-zgm-pbo-files.yaml +++ b/.gitea/workflows/pack-zgm-pbo-files.yaml @@ -14,7 +14,7 @@ jobs: repository: 17th-Ranger-Battalion-ORG/MissionsForZGM fetch-depth: 0 ref: 'main' - token: ${{ secrets.READ_TOKEN }} + token: ${{ secrets.RELEASE_TOKEN }} path: template - name: Get mission list @@ -33,7 +33,7 @@ jobs: with: fetch-depth: 0 ref: 'main' - token: ${{ secrets.READ_TOKEN }} + token: ${{ secrets.RELEASE_TOKEN }} path: template - name: Prepare template @@ -48,7 +48,7 @@ jobs: repository: 17th-Ranger-Battalion-ORG/MissionsForZGM fetch-depth: 0 ref: 'main' - token: ${{ secrets.READ_TOKEN }} + token: ${{ secrets.RELEASE_TOKEN }} path: zgm-files - name: Prepare tools -- 2.37.3.windows.1 From e64b29479df5a5a7a89bbf39a4c45afd322f5aac Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Thu, 15 Feb 2024 18:56:15 -0600 Subject: [PATCH 11/16] Update pack-zgm-pbo-files.yaml --- .gitea/workflows/pack-zgm-pbo-files.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/pack-zgm-pbo-files.yaml b/.gitea/workflows/pack-zgm-pbo-files.yaml index e6cb2bf..fd9ef48 100644 --- a/.gitea/workflows/pack-zgm-pbo-files.yaml +++ b/.gitea/workflows/pack-zgm-pbo-files.yaml @@ -15,7 +15,7 @@ jobs: fetch-depth: 0 ref: 'main' token: ${{ secrets.RELEASE_TOKEN }} - path: template + path: missions - name: Get mission list run: | @@ -57,7 +57,7 @@ jobs: - name: Pack PBOs run: | $date = Get-Date -Format "yyyy-MM-dd" - foreach ($file in Get-ChildItem missions) { + foreach ($file in Get-ChildItem zgm-files) { $map = (Get-Item zgm-files\missions\$file).Basename.split('\.')[-1] Copy-Item zgm-files\missions\$file\mission.sqm template\ (Get-Content .\template\mission_settings.hpp).Replace("MISSION AUTHOR","17th Ranger Battalion") | Set-Content .\template\mission_settings.hpp -- 2.37.3.windows.1 From 74b630bfaa918184c67c6419150b8b7798646871 Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Thu, 15 Feb 2024 18:59:45 -0600 Subject: [PATCH 12/16] Update pack-zgm-pbo-files.yaml --- .gitea/workflows/pack-zgm-pbo-files.yaml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/pack-zgm-pbo-files.yaml b/.gitea/workflows/pack-zgm-pbo-files.yaml index fd9ef48..1bb8370 100644 --- a/.gitea/workflows/pack-zgm-pbo-files.yaml +++ b/.gitea/workflows/pack-zgm-pbo-files.yaml @@ -15,15 +15,10 @@ jobs: fetch-depth: 0 ref: 'main' token: ${{ secrets.RELEASE_TOKEN }} - path: missions - name: Get mission list run: | - Get-ChildItem missions/* - - - name: Current Directory - run: | - Get-Location + Get-ChildItem MissionsForZGM/missions/* CreatePboFiles: runs-on: windows @@ -51,13 +46,21 @@ jobs: token: ${{ secrets.RELEASE_TOKEN }} path: zgm-files + - name: Get mission list + run: | + Get-ChildItem + + - name: Get mission list + run: | + Get-ChildItem zgm-files + - name: Prepare tools run: mkdir packed-files - name: Pack PBOs run: | $date = Get-Date -Format "yyyy-MM-dd" - foreach ($file in Get-ChildItem zgm-files) { + foreach ($file in Get-ChildItem zgm-files\missions) { $map = (Get-Item zgm-files\missions\$file).Basename.split('\.')[-1] Copy-Item zgm-files\missions\$file\mission.sqm template\ (Get-Content .\template\mission_settings.hpp).Replace("MISSION AUTHOR","17th Ranger Battalion") | Set-Content .\template\mission_settings.hpp -- 2.37.3.windows.1 From 10ef37cb800aea8d08d138e0fc3aca3af424d193 Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Thu, 15 Feb 2024 19:09:01 -0600 Subject: [PATCH 13/16] Update pack-zgm-pbo-files.yaml --- .gitea/workflows/pack-zgm-pbo-files.yaml | 30 ++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/pack-zgm-pbo-files.yaml b/.gitea/workflows/pack-zgm-pbo-files.yaml index 1bb8370..7c0f920 100644 --- a/.gitea/workflows/pack-zgm-pbo-files.yaml +++ b/.gitea/workflows/pack-zgm-pbo-files.yaml @@ -1,13 +1,22 @@ name: Pack ZGM mission PBO files -run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 on: push: branches: [main] jobs: GetMissionList: + name: Get ZGM mission list runs-on: windows steps: + - name: Diagnostics + run: | + echo "repository: ${{ gitea.repository }}" + echo "ref: ${{ gitea.ref }}" + echo "ref_name: ${{ gitea.ref_name }}" + echo "sha: ${{ gitea.sha }}" + echo "api_url: ${{ gitea.api_url }}" + echo "workflow: ${{ gitea.workflow }}" + - name: Checkout missions uses: actions/checkout@v3 with: @@ -18,11 +27,21 @@ jobs: - name: Get mission list run: | - Get-ChildItem MissionsForZGM/missions/* + Get-ChildItem MissionsForZGM/* CreatePboFiles: + name: Create PBO files runs-on: windows steps: + - name: Diagnostics + run: | + echo "repository: ${{ gitea.repository }}" + echo "ref: ${{ gitea.ref }}" + echo "ref_name: ${{ gitea.ref_name }}" + echo "sha: ${{ gitea.sha }}" + echo "api_url: ${{ gitea.api_url }}" + echo "workflow: ${{ gitea.workflow }}" + - name: Checkout template uses: actions/checkout@v3 with: @@ -36,6 +55,7 @@ jobs: Remove-Item -Recurse template\aaFrameworkUtils Remove-Item -Recurse template\framework\x Remove-Item -Recurse template\.git* + Remove-Item -Recurse template\.git - name: Checkout missions uses: actions/checkout@v3 @@ -55,7 +75,9 @@ jobs: Get-ChildItem zgm-files - name: Prepare tools - run: mkdir packed-files + run: | + mkdir packed-files + Remove-Item -Recurse template\.git - name: Pack PBOs run: | @@ -74,7 +96,7 @@ jobs: $missionName = $missionName.Matches.groups[1].value (Get-Content .\template\mission.sqm).Replace($missionName,"FRAMEWORK ZGM $date") | Set-Content .\template\mission.sqm - zgm-files\tools\PBOconsole.exe -pack template packed-files\mission.$map.pbo + zgm-files\tools\PBOconsole.exe -pack template packed-files\BASE_ZGM_$date.$map.pbo } - name: List PBOs -- 2.37.3.windows.1 From 40ee46ea9865402246a55b0800f26b39b97797cd Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Thu, 15 Feb 2024 19:10:48 -0600 Subject: [PATCH 14/16] Update pack-zgm-pbo-files.yaml --- .gitea/workflows/pack-zgm-pbo-files.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/pack-zgm-pbo-files.yaml b/.gitea/workflows/pack-zgm-pbo-files.yaml index 7c0f920..4c6673a 100644 --- a/.gitea/workflows/pack-zgm-pbo-files.yaml +++ b/.gitea/workflows/pack-zgm-pbo-files.yaml @@ -25,6 +25,10 @@ jobs: ref: 'main' token: ${{ secrets.RELEASE_TOKEN }} + - name: Get current directory list + run: | + Get-ChildItem + - name: Get mission list run: | Get-ChildItem MissionsForZGM/* @@ -55,7 +59,6 @@ jobs: Remove-Item -Recurse template\aaFrameworkUtils Remove-Item -Recurse template\framework\x Remove-Item -Recurse template\.git* - Remove-Item -Recurse template\.git - name: Checkout missions uses: actions/checkout@v3 -- 2.37.3.windows.1 From 2a776718c016c7b3c8e46f191bc8be2e3c21fdc6 Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Thu, 22 Feb 2024 22:17:40 -0600 Subject: [PATCH 15/16] add issue templates --- .gitea/ISSUE_TEMPLATE/bug_report.yaml | 37 ++++++++++++++++++++++ .gitea/ISSUE_TEMPLATE/config.yaml | 1 + .gitea/ISSUE_TEMPLATE/feature_request.yaml | 34 ++++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 .gitea/ISSUE_TEMPLATE/bug_report.yaml create mode 100644 .gitea/ISSUE_TEMPLATE/config.yaml create mode 100644 .gitea/ISSUE_TEMPLATE/feature_request.yaml diff --git a/.gitea/ISSUE_TEMPLATE/bug_report.yaml b/.gitea/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000..21c2b9c --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,37 @@ +name: Bug Report +about: File a bug report to help us improve +title: "" +labels: "Kind/Bug" +ref: main +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: textarea + id: what-happened + attributes: + label: Describe the bug! + description: What did you see, and what did you expect to happen. + render: markdown + value: "A bug happened!" + validations: + required: true + - type: textarea + id: reproduce-steps + attributes: + label: How can we reproduce this? + description: "Steps to reproduce the behavior, and attach full log here if needed." + value: | + 1. Go to '...' + 2. Click on '....' + 3. Scroll down to '....' + 4. See error + validations: + required: true + - type: textarea + id: logs + attributes: + label: Relevant log output? + description: Please copy and paste any relevant log output. This will be automatically formatted into code. + render: shell \ No newline at end of file diff --git a/.gitea/ISSUE_TEMPLATE/config.yaml b/.gitea/ISSUE_TEMPLATE/config.yaml new file mode 100644 index 0000000..0086358 --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/config.yaml @@ -0,0 +1 @@ +blank_issues_enabled: true diff --git a/.gitea/ISSUE_TEMPLATE/feature_request.yaml b/.gitea/ISSUE_TEMPLATE/feature_request.yaml new file mode 100644 index 0000000..7f953e5 --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/feature_request.yaml @@ -0,0 +1,34 @@ +name: Feature Request +about: Suggest an idea for this project +title: "" +labels: "Kind/Feature" +ref: main +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to suggest an idea to us! + - type: textarea + id: feature-description + attributes: + label: Is your feature request related to a problem? + description: A clear and concise description of what the problem is. + render: markdown + value: " I'm always frustrated when [...]" + - type: textarea + id: feature-solution + attributes: + label: Describe the solution you would like. + description: "A clear and concise description of what you want to happen. Context and screenshots welcome!" + value: | + 1. Go to '...' + 2. Look at '....' + 3. Change to '....' + validations: + required: true + - type: textarea + id: feature-references + attributes: + label: Describe the alternatives you have considered. + description: "A clear and concise description of any alternative solutions or features you've considered." + render: markdown -- 2.37.3.windows.1 From 77c3b0d67a7a04b69d61800a955fa858a69610c0 Mon Sep 17 00:00:00 2001 From: hizumi <> Date: Thu, 22 Feb 2024 23:12:27 -0600 Subject: [PATCH 16/16] update workflows with new formatting and urls --- ...sting-snapshot.yaml => on-push-devel.yaml} | 2 +- .gitea/workflows/on-release.yaml | 68 ++++++++++ .gitea/workflows/pack-zgm-pbo-files.yaml | 124 ------------------ 3 files changed, 69 insertions(+), 125 deletions(-) rename .gitea/workflows/{create-testing-snapshot.yaml => on-push-devel.yaml} (99%) create mode 100644 .gitea/workflows/on-release.yaml delete mode 100644 .gitea/workflows/pack-zgm-pbo-files.yaml diff --git a/.gitea/workflows/create-testing-snapshot.yaml b/.gitea/workflows/on-push-devel.yaml similarity index 99% rename from .gitea/workflows/create-testing-snapshot.yaml rename to .gitea/workflows/on-push-devel.yaml index 5fb5877..32ca8c6 100644 --- a/.gitea/workflows/create-testing-snapshot.yaml +++ b/.gitea/workflows/on-push-devel.yaml @@ -62,7 +62,7 @@ jobs: Invoke-WebRequest -Uri "${{ gitea.api_url }}/repos/${{ gitea.repository }}/tags" -Method Post -Headers $headers -ContentType "application/json" -Body "{`"message`": `"testing-release`", `"tag_name`": `"testing-release`", `"target`": `"${{ gitea.sha }}`"}" - name: Create new testing-release - uses: https://gitea.com/actions/gitea-release-action@v1.1.6 + uses: https://gitea.com/actions/gitea-release-action@v1.3.0 with: tag_name: 'testing-release' name: 'testing-release' diff --git a/.gitea/workflows/on-release.yaml b/.gitea/workflows/on-release.yaml new file mode 100644 index 0000000..4acdbca --- /dev/null +++ b/.gitea/workflows/on-release.yaml @@ -0,0 +1,68 @@ +name: Pack Release files +on: + release: + types: [published] + +jobs: + DispatchZGMBuild: + name: Dispatch MissionZGM build job + runs-on: windows + steps: + - name: Diagnostics + run: | + echo "repository: ${{ gitea.repository }}" + echo "ref: ${{ gitea.ref }}" + echo "ref_name: ${{ gitea.ref_name }}" + echo "sha: ${{ gitea.sha }}" + echo "api_url: ${{ gitea.api_url }}" + echo "workflow: ${{ gitea.workflow }}" + - name: Publish remote issue + run: | + $headers = @{ + "accept" = "application/json" + "Authorization" = "token ${{ secrets.RUNNER_ISSUE_TOKEN }}" + } + $response = Invoke-RestMethod -Uri "${{ gitea.api_url }}/repos17th-Ranger-Battalion-ORG/MissionsForZGM/issues" -Method Post -Headers $headers -ContentType "application/json" -Body "{`"title`": `"publish-release`"}" + + CreateRelease: + name: Publish cleaned template + runs-on: windows + steps: + - name: Diagnostics + run: | + echo "repository: ${{ gitea.repository }}" + echo "ref: ${{ gitea.ref }}" + echo "ref_name: ${{ gitea.ref_name }}" + echo "sha: ${{ gitea.sha }}" + echo "api_url: ${{ gitea.api_url }}" + echo "workflow: ${{ gitea.workflow }}" + + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: 'main' + path: release + + - name: Prepare template + run: | + mkdir MissionTemplate + cd MissionTemplate + Get-ChildItem ..\release\ | Copy-Item -Recurse + Remove-Item -Recurse aaFrameworkUtils + Remove-Item -Recurse framework\x + Remove-Item -Recurse .git* + Get-ChildItem + + - name: Create archive + run: | + $revision = git rev-parse --short=10 HEAD + cd MissionTemplate + $tag = git describe --abbrev=0 --tags + Compress-Archive MissionFramework mission-maker-template-v$tag-$revision.zip + + - name: Add archive to release + uses: https://gitea.com/actions/gitea-release-action@v1.3.0 + with: + files: |- + mission-maker-template*.zip diff --git a/.gitea/workflows/pack-zgm-pbo-files.yaml b/.gitea/workflows/pack-zgm-pbo-files.yaml deleted file mode 100644 index 4c6673a..0000000 --- a/.gitea/workflows/pack-zgm-pbo-files.yaml +++ /dev/null @@ -1,124 +0,0 @@ -name: Pack ZGM mission PBO files -on: - push: - branches: [main] - -jobs: - GetMissionList: - name: Get ZGM mission list - runs-on: windows - steps: - - name: Diagnostics - run: | - echo "repository: ${{ gitea.repository }}" - echo "ref: ${{ gitea.ref }}" - echo "ref_name: ${{ gitea.ref_name }}" - echo "sha: ${{ gitea.sha }}" - echo "api_url: ${{ gitea.api_url }}" - echo "workflow: ${{ gitea.workflow }}" - - - name: Checkout missions - uses: actions/checkout@v3 - with: - repository: 17th-Ranger-Battalion-ORG/MissionsForZGM - fetch-depth: 0 - ref: 'main' - token: ${{ secrets.RELEASE_TOKEN }} - - - name: Get current directory list - run: | - Get-ChildItem - - - name: Get mission list - run: | - Get-ChildItem MissionsForZGM/* - - CreatePboFiles: - name: Create PBO files - runs-on: windows - steps: - - name: Diagnostics - run: | - echo "repository: ${{ gitea.repository }}" - echo "ref: ${{ gitea.ref }}" - echo "ref_name: ${{ gitea.ref_name }}" - echo "sha: ${{ gitea.sha }}" - echo "api_url: ${{ gitea.api_url }}" - echo "workflow: ${{ gitea.workflow }}" - - - name: Checkout template - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: 'main' - token: ${{ secrets.RELEASE_TOKEN }} - path: template - - - name: Prepare template - run: | - Remove-Item -Recurse template\aaFrameworkUtils - Remove-Item -Recurse template\framework\x - Remove-Item -Recurse template\.git* - - - name: Checkout missions - uses: actions/checkout@v3 - with: - repository: 17th-Ranger-Battalion-ORG/MissionsForZGM - fetch-depth: 0 - ref: 'main' - token: ${{ secrets.RELEASE_TOKEN }} - path: zgm-files - - - name: Get mission list - run: | - Get-ChildItem - - - name: Get mission list - run: | - Get-ChildItem zgm-files - - - name: Prepare tools - run: | - mkdir packed-files - Remove-Item -Recurse template\.git - - - name: Pack PBOs - run: | - $date = Get-Date -Format "yyyy-MM-dd" - foreach ($file in Get-ChildItem zgm-files\missions) { - $map = (Get-Item zgm-files\missions\$file).Basename.split('\.')[-1] - Copy-Item zgm-files\missions\$file\mission.sqm template\ - (Get-Content .\template\mission_settings.hpp).Replace("MISSION AUTHOR","17th Ranger Battalion") | Set-Content .\template\mission_settings.hpp - (Get-Content .\template\mission_settings.hpp).Replace("THIS APPEARS ON TOP OF THE LOADING SCREEN IMAGE","GAME MASTER") | Set-Content .\template\mission_settings.hpp - (Get-Content .\template\mission_settings.hpp).Replace("THIS APPEARS BELOW THE LOADING SCREEN IMAGE","Forcing you to respawn since 2013") | Set-Content .\template\mission_settings.hpp - (Get-Content .\template\mission_settings.hpp).Replace("THIS IS THE NAME ON THE #MISSIONS LIST","BASE ZGM $date") | Set-Content .\template\mission_settings.hpp - (Get-Content .\template\mission_settings.hpp).Replace("THIS IS WHERE YOU DESCRIBE THE MISSION IN THE #MISSION LIST","I have 2 headless clients, and am most likely an airfield spawn") | Set-Content .\template\mission_settings.hpp - (Get-Content .\template\mission_settings.hpp).Replace("MY SERIES NAME","ZEUS GAME MASTER") | Set-Content .\template\mission_settings.hpp - - $missionName = Get-Content .\template\mission.sqm | Select-String -Pattern 'sourceName="(.*)";' - $missionName = $missionName.Matches.groups[1].value - (Get-Content .\template\mission.sqm).Replace($missionName,"FRAMEWORK ZGM $date") | Set-Content .\template\mission.sqm - - zgm-files\tools\PBOconsole.exe -pack template packed-files\BASE_ZGM_$date.$map.pbo - } - - - name: List PBOs - run: | - cd packed-files - Get-ChildItem - - - name: Backup artifacts from runner - uses: actions/upload-artifact@v3 - with: - name: zgm-pbo-files - path: packed-files/* - - - name: Create release - uses: https://gitea.com/actions/gitea-release-action@v1.1.6 - with: - tag_name: 'snapshot-release' - release_name: 'snapshot-release' - files: |- - packed-files/** - api_key: '${{secrets.RELEASE_TOKEN}}' - -- 2.37.3.windows.1