Compare commits
5 Commits
5f2b7e44e7
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3d28ed761 | ||
|
|
0e4702e7b0 | ||
|
|
638a2ae034 | ||
|
|
f00dee30ed | ||
|
|
3d70b6d78c |
37
.gitea/ISSUE_TEMPLATE/bug_report.yaml
Normal file
37
.gitea/ISSUE_TEMPLATE/bug_report.yaml
Normal file
@@ -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
|
||||
1
.gitea/ISSUE_TEMPLATE/config.yaml
Normal file
1
.gitea/ISSUE_TEMPLATE/config.yaml
Normal file
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: true
|
||||
34
.gitea/ISSUE_TEMPLATE/feature_request.yaml
Normal file
34
.gitea/ISSUE_TEMPLATE/feature_request.yaml
Normal file
@@ -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
|
||||
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/MissionTemplate
|
||||
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