Fixed action

This commit is contained in:
qwsdcvghyu89
2026-06-05 23:08:56 +10:00
parent 411db7de4e
commit 06f57e3c02
+46 -44
View File
@@ -1,50 +1,52 @@
on:
push:
- main
branches:
- main
workflow_dispatch:
jobs:
- name: Build Nightly Release
runs-on: Debian-x86
strategy:
matrix:
platform: [linux, windows, mac]
steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Build
id: build
uses: felix-schindler/build-godot-action@v2.0.0
with:
name: wrplat
preset: ${{ matrix.platform }}
debugMode: "true"
- name: Clean up Release & Update Tag
run: |
# Find and delete the old Gitea Release payload via API
RELEASE_ID=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" ${{ github.api_url }}/repos/${{ github.repository }}/releases/tags/nightly | jq -r '.id')
if [ "$RELEASE_ID" != "null" ] && [ -n "$RELEASE_ID" ]; then
echo "Deleting old release ID: $RELEASE_ID"
curl -s -X DELETE -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" ${{ github.api_url }}/repos/${{ github.repository }}/releases/$RELEASE_ID
fi
# Force the 'nightly' Git tag to point to this new commit and push it
git tag -f nightly ${{ github.sha }}
git push -f origin nightly
- name: Update Nightly Release
uses: softprops/action-gh-release@v2
with:
tag_name: nightly
target_commitish: ${{ github.sha }}
name: "Nightly Development Build"
body: |
Automated rolling nightly build from the latest commit on `main`.
- build-nightly:
name: Build Nightly Release
runs-on: Debian-x86
strategy:
matrix:
platform: [linux, windows, mac]
steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Build
id: build
uses: felix-schindler/build-godot-action@v2.0.0
with:
name: wrplat
preset: ${{ matrix.platform }}
debugMode: "true"
- name: Clean up Release & Update Tag
run: |
# Find and delete the old Gitea Release payload via API
RELEASE_ID=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" ${{ github.api_url }}/repos/${{ github.repository }}/releases/tags/nightly | jq -r '.id')
if [ "$RELEASE_ID" != "null" ] && [ -n "$RELEASE_ID" ]; then
echo "Deleting old release ID: $RELEASE_ID"
curl -s -X DELETE -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" ${{ github.api_url }}/repos/${{ github.repository }}/releases/$RELEASE_ID
fi
**Commit:** ${{ github.sha }}
prerelease: true
files: |
${{ github.workspace }}/${{ steps.build.outputs.build }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Force the 'nightly' Git tag to point to this new commit and push it
git tag -f nightly ${{ github.sha }}
git push -f origin nightly
- name: Update Nightly Release
uses: softprops/action-gh-release@v2
with:
tag_name: nightly
target_commitish: ${{ github.sha }}
name: "Nightly Development Build"
body: |
Automated rolling nightly build from the latest commit on `main`.
**Commit:** ${{ github.sha }}
prerelease: true
files: |
${{ github.workspace }}/${{ steps.build.outputs.build }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}