Skip to content

Commit

Permalink
Merge pull request #60 from spinkube/create-tag-on-release
Browse files Browse the repository at this point in the history
create tag on release
  • Loading branch information
bacongobbler authored Mar 12, 2024
2 parents 8d049e2 + 2ef5569 commit bc47bc2
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set the release version (canary)
run: echo "RELEASE_VERSION=canary" >> $GITHUB_ENV

- name: Set the release version (tag)
if: startsWith(github.ref, 'refs/tags/v')
run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Setup Go
uses: actions/setup-go@v5
with:
Expand All @@ -35,10 +42,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

- name: create GitHub release (canary)
- name: Create GitHub release (canary)
if: github.ref == 'refs/heads/main'
run: |
gh release delete canary --cleanup-tag
gh release delete canary --cleanup-tag || true
gh release create canary dist/spin-plugin-kube*.tar.gz \
--title canary \
--prerelease \
Expand All @@ -49,6 +56,14 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}

- name: Create GitHub release (tag)
if: startsWith(github.ref, 'refs/tags/v')
run: |
gh release create ${{ env.RELEASE_VERSION }} dist/spin-plugin-kube*.tar.gz \
--title "Spin Plugin Kube ${{ env.RELEASE_VERSION }}"
env:
GH_TOKEN: ${{ github.token }}

- name: Release Plugin
uses: rajatjindal/spin-plugin-releaser@v1
with:
Expand Down

0 comments on commit bc47bc2

Please sign in to comment.