Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/update_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,26 @@ jobs:
GH_TOKEN: ${{ github.token }}
RELEASE_NAME: ${{ github.ref_type == 'tag' && github.ref_name || github.ref == 'refs/heads/develop' && 'unstable' || 'latest' }}
RELEASE_TITLE: ${{ github.ref_type == 'tag' && github.ref_name || github.ref == 'refs/heads/develop' && 'Unstable' || 'Latest' }}
RELEASE_TARGET: ${{ github.sha }}
RELEASE_PRERELEASE_FLAG: ${{ github.ref == 'refs/heads/develop' && '--prerelease' || '' }}

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Release Exists
run: |
if ! gh release view "$RELEASE_NAME" --repo "${{ github.repository }}"; then
gh release create "$RELEASE_NAME" --repo "${{ github.repository }}" --title "$RELEASE_TITLE" --notes " "
gh release create "$RELEASE_NAME" --repo "${{ github.repository }}" --title "$RELEASE_TITLE" --target "$RELEASE_TARGET" $RELEASE_PRERELEASE_FLAG --notes " "
fi

- name: Retarget Rolling Release
if: github.ref_type != 'tag'
run: gh release edit "$RELEASE_NAME" --repo "${{ github.repository }}" --title "$RELEASE_TITLE" --target "$RELEASE_TARGET"

- name: Mark Unstable As Prerelease
if: github.ref == 'refs/heads/develop'
run: gh release edit "$RELEASE_NAME" --repo "${{ github.repository }}" --prerelease

- name: Download 4cc Artifacts
uses: actions/download-artifact@v4
with:
Expand Down