Compare commits
2 Commits
5f2b7e44e7
...
f00dee30ed
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f00dee30ed | ||
|
|
3d70b6d78c |
27
.gitea/ISSUE_TEMPLATE/bug_report.md
Normal file
27
.gitea/ISSUE_TEMPLATE/bug_report.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: 'Kind/Bug'
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**To Reproduce**
|
||||||
|
Steps to reproduce the behavior:
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
||||||
20
.gitea/ISSUE_TEMPLATE/feature_request.md
Normal file
20
.gitea/ISSUE_TEMPLATE/feature_request.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: 'Kind/Feature'
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Describe alternatives you've considered**
|
||||||
|
A clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
||||||
141
.gitea/workflows/generate-release.yaml
Normal file
141
.gitea/workflows/generate-release.yaml
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: powershell
|
||||||
|
|
||||||
|
name: Pack ZGM mission PBO files
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
CreatePboFiles:
|
||||||
|
name: Create PBO files
|
||||||
|
runs-on: windows
|
||||||
|
if: ${{ gitea.event.issue.title == 'publish-release' }}
|
||||||
|
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 }}"
|
||||||
|
echo "event: ${{ gitea.event.issue.number }}"
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: 'main'
|
||||||
|
|
||||||
|
- name: Pull MissionTemplate
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: hizumi/testrepo
|
||||||
|
fetch-depth: 0
|
||||||
|
ref: 'main'
|
||||||
|
token: ${{ secrets.RUNNER_REPO_READ_TOKEN }}
|
||||||
|
path: MissionTemplate
|
||||||
|
|
||||||
|
- name: Prepare tools
|
||||||
|
run: mkdir zgm-files
|
||||||
|
|
||||||
|
- name: Prepare template
|
||||||
|
id: prep_template
|
||||||
|
run: |
|
||||||
|
mkdir template
|
||||||
|
cd template
|
||||||
|
Get-ChildItem ..\MissionTemplate\ | Copy-Item -Recurse
|
||||||
|
Remove-Item -Recurse aaFrameworkUtils
|
||||||
|
Remove-Item -Recurse framework\x
|
||||||
|
Remove-Item -Recurse .git*
|
||||||
|
Get-ChildItem
|
||||||
|
|
||||||
|
- name: Get mission list
|
||||||
|
run: |
|
||||||
|
Get-ChildItem missions
|
||||||
|
|
||||||
|
- name: Pack PBOs
|
||||||
|
run: |
|
||||||
|
$revision = git rev-parse --short=10 HEAD
|
||||||
|
cd MissionTemplate
|
||||||
|
$tag = git describe --abbrev=0 --tags
|
||||||
|
cd ..
|
||||||
|
$date = Get-Date -Format "yyyy-MM-dd"
|
||||||
|
foreach ($file in Get-ChildItem missions) {
|
||||||
|
$map = (Get-Item missions\$file).Basename.split('\.')[-1]
|
||||||
|
Copy-Item 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 v$tag") | Set-Content .\template\mission_settings.hpp
|
||||||
|
(Get-Content .\template\mission_settings.hpp).Replace("THIS IS WHERE YOU DESCRIBE THE MISSION IN THE #MISSION LIST","ZGM generated $date on framework v$tag $revision") | 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,"$map ZGM $date v$tag") | Set-Content .\template\mission.sqm
|
||||||
|
|
||||||
|
tools\PBOconsole.exe -pack template zgm-files\BASE-ZGM-$date-v$tag.$map.pbo
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: List PBOs
|
||||||
|
run: |
|
||||||
|
cd zgm-files
|
||||||
|
Get-ChildItem
|
||||||
|
|
||||||
|
- name: Create archive
|
||||||
|
run: |
|
||||||
|
$revision = git rev-parse --short=10 HEAD
|
||||||
|
cd MissionTemplate
|
||||||
|
$tag = git describe --abbrev=0 --tags
|
||||||
|
cd ..
|
||||||
|
Compress-Archive zgm-files zgm-pbo-files-v$tag-$revision.zip
|
||||||
|
Get-ChildItem zgm-pbo-files-v$tag-$revision.zip
|
||||||
|
|
||||||
|
- name: Backup artifacts from runner
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: zgm-pbo-files
|
||||||
|
path: zgm-pbo-files*.zip
|
||||||
|
|
||||||
|
- name: Delete old release
|
||||||
|
run: |
|
||||||
|
$headers = @{
|
||||||
|
"accept" = "application/json"
|
||||||
|
"Authorization" = "token ${{ gitea.token }}"
|
||||||
|
}
|
||||||
|
Invoke-WebRequest -Uri "${{ gitea.api_url }}/repos/${{ gitea.repository }}/releases/tags/release" -Method Delete -Headers $headers
|
||||||
|
|
||||||
|
- name: Delete old release tag
|
||||||
|
run: |
|
||||||
|
$headers = @{
|
||||||
|
"accept" = "application/json"
|
||||||
|
"Authorization" = "token ${{ gitea.token }}"
|
||||||
|
}
|
||||||
|
Invoke-WebRequest -Uri "${{ gitea.api_url }}/repos/${{ gitea.repository }}/tags/release" -Method Delete -Headers $headers
|
||||||
|
|
||||||
|
- name: Create new release tag
|
||||||
|
run: |
|
||||||
|
$headers = @{
|
||||||
|
"accept" = "application/json"
|
||||||
|
"Authorization" = "token ${{ gitea.token }}"
|
||||||
|
}
|
||||||
|
Invoke-WebRequest -Uri "${{ gitea.api_url }}/repos/${{ gitea.repository }}/tags" -Method Post -Headers $headers -ContentType "application/json" -Body "{`"message`": `"release`", `"tag_name`": `"release`", `"target`": `"${{ gitea.sha }}`"}"
|
||||||
|
|
||||||
|
- name: Create release
|
||||||
|
uses: https://gitea.com/actions/gitea-release-action@v1.3.0
|
||||||
|
with:
|
||||||
|
name: release
|
||||||
|
tag_name: release
|
||||||
|
files: |-
|
||||||
|
zgm-pbo-files*.zip
|
||||||
|
|
||||||
|
- name: Delete issue
|
||||||
|
run: |
|
||||||
|
$headers = @{
|
||||||
|
"accept" = "application/json"
|
||||||
|
"Authorization" = "token ${{ secrets.RUNNER_ISSUE_TOKEN }}"
|
||||||
|
}
|
||||||
|
$response = Invoke-RestMethod -Uri "${{ gitea.api_url }}/repos/${{ gitea.repository }}/issues/${{ gitea.event.issue.number }}" -Method Delete -Headers $headers
|
||||||
Reference in New Issue
Block a user