Skip to content

Commit

Permalink
Merge pull request #364 from vdice/ci/update-canary
Browse files Browse the repository at this point in the history
  • Loading branch information
radu-matei authored Apr 15, 2022
2 parents aaf2b5e + f9db298 commit f9ce401
Showing 1 changed file with 23 additions and 38 deletions.
61 changes: 23 additions & 38 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,36 +129,6 @@ jobs:
name: spin
path: _dist/spin-${{ env.RELEASE_VERSION }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.zip

# TODO: actually update/override the canary release each time
# See https://github.com/fermyon/spin/issues/128
- name: upload binary to canary GitHub release
uses: svenstaro/upload-release-action@2.2.1
if: github.ref == 'refs/heads/main' && runner.os != 'Windows'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: _dist/spin-${{ env.RELEASE_VERSION }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz
asset_name: spin-${{ env.RELEASE_VERSION }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz
tag: canary
overwrite: true
prerelease: true
body: |
This is a "canary" release of the most recent commits on our main branch. Canary is **not stable**.
It is only intended for developers wishing to try out the latest features in Spin, some of which may not be fully implemented.
- name: upload binary to canary GitHub release
uses: svenstaro/upload-release-action@2.2.1
if: github.ref == 'refs/heads/main' && runner.os == 'Windows'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: _dist/spin-${{ env.RELEASE_VERSION }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.zip
asset_name: spin-${{ env.RELEASE_VERSION }}-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.zip
tag: canary
overwrite: true
prerelease: true
body: |
This is a "canary" release of the most recent commits on our main branch. Canary is **not stable**.
It is only intended for developers wishing to try out the latest features in Spin, some of which may not be fully implemented.
checksums:
name: generate release checksums
runs-on: ubuntu-latest
Expand Down Expand Up @@ -187,16 +157,31 @@ jobs:
name: spin
path: checksums-${{ env.RELEASE_VERSION }}.txt

- name: upload checksums to canary GitHub release
uses: svenstaro/upload-release-action@2.2.1
if: github.ref == 'refs/heads/main'
update-canary:
name: update canary release
runs-on: ubuntu-latest
needs: checksums
if: github.ref == 'refs/heads/main'
steps:
- name: Download release assets
uses: actions/download-artifact@v3
with:
name: spin

- name: Delete canary tag
uses: dev-drprasad/delete-tag-and-release@v0.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: canary

- name: Recreate canary tag and release
uses: ncipollo/release-action@v1.10.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: checksums-${{ env.RELEASE_VERSION }}.txt
asset_name: checksums-${{ env.RELEASE_VERSION }}.txt
tag: canary
overwrite: true
allowUpdates: true
prerelease: true
artifacts: "checksums-canary.txt,spin-canary*"
body: |
This is a "canary" release of the most recent commits on our main branch. Canary is **not stable**.
It is only intended for developers wishing to try out the latest features in Spin, some of which may not be fully implemented.
It is only intended for developers wishing to try out the latest features in Spin, some of which may not be fully implemented.

0 comments on commit f9ce401

Please sign in to comment.