diff options
| author | Bradley Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-10-11 20:00:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-11 20:00:29 -0400 |
| commit | 3e9dc7f8353edd0ef389005fbf98a900e8007b6c (patch) | |
| tree | daa46fa8ee9d867b28ecab7b24693a986db9aad9 /.github/workflows | |
| parent | ed91e4409c4605baa58d3ab333d9d093a112212c (diff) | |
| parent | 617bd092c14e4cf997d99eea9d9ad2c5ce12e8af (diff) | |
Merge pull request #1088 from BradLewis/feat/create-releasesdev-2025-09
Update nightly release action to allow creating releases tied to odin versions
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/release.yml (renamed from .github/workflows/nightly.yml) | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/.github/workflows/nightly.yml b/.github/workflows/release.yml index 3efe602..5f8a312 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,14 @@ -name: nightly +name: release env: ODIN_BRANCH: dev-2025-09 on: workflow_dispatch: schedule: - - cron: 0 2 * * 0 + - cron: 0 2 * * 0 # weekly 'nightly' release + push: + tags: + - dev-** jobs: dist-arm64-darwin: @@ -13,6 +16,11 @@ jobs: timeout-minutes: 15 steps: - uses: actions/checkout@v1 + - name: Set ODIN_BRANCH from tag if available + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + run: | + echo "ODIN_BRANCH=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + echo "OLS_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - name: Download LLVM and setup PATH run: | brew install llvm@17 @@ -33,7 +41,7 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: dist-arm64-darwin + name: dist-arm64-darwin path: ./dist dist-x86_64-darwin: @@ -41,6 +49,11 @@ jobs: timeout-minutes: 15 steps: - uses: actions/checkout@v1 + - name: Set ODIN_BRANCH from tag if available + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + run: | + echo "ODIN_BRANCH=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + echo "OLS_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - name: Download LLVM and setup PATH run: | brew install llvm@17 @@ -71,6 +84,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + - name: Set ODIN_BRANCH from tag if available + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + run: | + echo "ODIN_BRANCH=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + echo "OLS_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - name: Download LLVM run: | wget https://apt.llvm.org/llvm.sh @@ -101,6 +119,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + - name: Set ODIN_BRANCH from tag if available + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + run: | + echo "ODIN_BRANCH=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + echo "OLS_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - name: Download LLVM run: | wget https://apt.llvm.org/llvm.sh @@ -133,6 +156,13 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v1 + - name: Set ODIN_BRANCH from tag if available + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + shell: pwsh + run: | + $tagName = $env:GITHUB_REF.Replace('refs/tags/', '') + echo "ODIN_BRANCH=$tagName" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "OLS_VERSION=$tagName" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Download Odin shell: cmd run: | @@ -224,5 +254,5 @@ jobs: uses: ./.github/actions/github-release with: files: "dist/*" - name: "nightly" + name: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && github.ref_name || 'nightly' }} token: ${{ secrets.GITHUB_TOKEN }} |