Files
MissionTemplate/.gitea/workflows/create-testing-snapshot.yaml
hizumi f11cadbd06
All checks were successful
Generate testing snapshot / Create testing release (push) Successful in 31s
Update create-testing-snapshot.yaml
correct api url
2024-02-13 19:58:21 -06:00

55 lines
1.8 KiB
YAML

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/api/v1/repos/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/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
with:
tag_name: 'testing-release'
name: 'testing-release'
prerelease: true
files: |-
framework-test-snapshot.zip