CI: single nightly release (nightly tag) instead of per-push dev tags
Some checks failed
Build and Release / build-and-release (push) Failing after 1s
Some checks failed
Build and Release / build-and-release (push) Failing after 1s
Made-with: Cursor
This commit is contained in:
50
.github/workflows/build-and-release.yml
vendored
50
.github/workflows/build-and-release.yml
vendored
@@ -3,6 +3,10 @@ name: Build and Release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: nightly-release-${{ github.repository }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-release:
|
build-and-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -22,19 +26,35 @@ jobs:
|
|||||||
- name: Build zip package
|
- name: Build zip package
|
||||||
run: make zip
|
run: make zip
|
||||||
|
|
||||||
- name: Get version
|
- name: Nightly release (single tag, updated in place)
|
||||||
id: version
|
env:
|
||||||
run: echo "tag_name=dev-$(date +'%Y%m%d-%H%M%S')-${GITHUB_SHA::8}" >> $GITHUB_OUTPUT
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
TAG=nightly
|
||||||
|
ZIP="./output/OmniNX Downloader.zip"
|
||||||
|
REPO="${{ github.repository }}"
|
||||||
|
SHA="${{ github.sha }}"
|
||||||
|
REF="${{ github.ref_name }}"
|
||||||
|
|
||||||
- name: Create dev release
|
git config user.name "github-actions[bot]"
|
||||||
uses: softprops/action-gh-release@v1
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
with:
|
git tag -f "$TAG"
|
||||||
tag_name: ${{ steps.version.outputs.tag_name }}
|
git push origin "refs/tags/$TAG" --force
|
||||||
name: Release ${{ steps.version.outputs.tag_name }}
|
|
||||||
body: |
|
NOTES="Single nightly build artifact (updated every push).
|
||||||
Automated dev build of OmniNX Downloader
|
|
||||||
Commit: ${{ github.sha }}
|
**Commit:** \`${SHA}\`
|
||||||
Branch: ${{ github.ref_name }}
|
**Branch:** \`${REF}\`
|
||||||
draft: false
|
**Built:** $(date -u '+%Y-%m-%d %H:%M:%S UTC')"
|
||||||
prerelease: true
|
|
||||||
files: ./output/OmniNX Downloader.zip
|
if gh release view "$TAG" --repo "$REPO" >/dev/null 2>&1; then
|
||||||
|
gh release upload "$TAG" "$ZIP" --clobber --repo "$REPO"
|
||||||
|
gh release edit "$TAG" --title "Nightly" --notes "$NOTES" --prerelease --repo "$REPO"
|
||||||
|
else
|
||||||
|
gh release create "$TAG" "$ZIP" \
|
||||||
|
--title "Nightly" \
|
||||||
|
--notes "$NOTES" \
|
||||||
|
--prerelease \
|
||||||
|
--repo "$REPO"
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user