Fixed action

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