Nightly Beta Releases #76
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly Beta Releases | |
| on: | |
| schedule: | |
| - cron: '45 5 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: nightly-beta-release | |
| cancel-in-progress: false | |
| jobs: | |
| tag: | |
| name: create beta tag when app changed | |
| runs-on: windows-2025-vs2026 | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Validate planner | |
| shell: pwsh | |
| run: | | |
| ./.github/scripts/Test-WorkflowSyntax.ps1 | |
| ./.github/scripts/Test-NightlyBetaPlan.ps1 | |
| ./.github/scripts/Test-ReleaseVersionSequence.ps1 | |
| - name: Plan nightly beta | |
| id: plan | |
| shell: pwsh | |
| run: | | |
| git fetch --tags --force | |
| ./.github/scripts/Get-NightlyBetaPlan.ps1 | |
| - name: Report no changes | |
| if: ${{ steps.plan.outputs.has_changes != 'true' }} | |
| shell: pwsh | |
| run: Write-Host "No app changes since the latest release tag." | |
| - name: Push beta tag | |
| if: ${{ steps.plan.outputs.has_changes == 'true' }} | |
| shell: pwsh | |
| env: | |
| RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAG_NAME: ${{ steps.plan.outputs.next_tag }} | |
| COMMIT_COUNT: ${{ steps.plan.outputs.commit_count }} | |
| run: | | |
| if ([string]::IsNullOrWhiteSpace($env:RELEASE_TOKEN)) { | |
| throw "GITHUB_TOKEN is required to push beta tags." | |
| } | |
| if ([string]::IsNullOrWhiteSpace($env:TAG_NAME)) { | |
| throw "Planner did not return a beta tag." | |
| } | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git tag -a $env:TAG_NAME -m "VRCInventoryManager nightly beta $env:TAG_NAME" | |
| if ($LASTEXITCODE -ne 0) { throw "Could not create beta tag $env:TAG_NAME" } | |
| $remote = "https://x-access-token:$env:RELEASE_TOKEN@github.com/${{ github.repository }}.git" | |
| git push $remote "refs/tags/$env:TAG_NAME" | |
| if ($LASTEXITCODE -ne 0) { throw "Could not push beta tag $env:TAG_NAME" } | |
| Write-Host "Pushed $env:TAG_NAME for $env:COMMIT_COUNT commit(s)." |