Skip to content

Merge pull request #52 from spinkube/spin-plugin-kube #28

Merge pull request #52 from spinkube/spin-plugin-kube

Merge pull request #52 from spinkube/spin-plugin-kube #28

Workflow file for this run

name: Release
on:
push:
branches:
- main
- "v[0-9]+.[0-9]+"
tags:
- "v*"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22.x"
- name: Setup Private Git Repo Access
run: echo "machine github.com login bacongobbler password ${GITHUB_TOKEN}" > $HOME/.netrc
env:
GITHUB_TOKEN: ${{ secrets.SPINKUBE_GITHUB_ACCESS_TOKEN }}
- name: Install dependencies
run: go mod download
- name: GoReleaser
uses: goreleaser/goreleaser-action@v5.0.0
with:
version: latest
args: release --clean ${{ github.ref == 'refs/heads/main' && '--snapshot' || '' }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: create GitHub release (canary)
if: github.ref == 'refs/heads/main'
run: |
gh release delete canary --cleanup-tag
gh release create canary dist/spin-plugin-kube*.tar.gz \
--title canary \
--prerelease \
--notes-file - <<- EOF
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.
EOF
env:
GH_TOKEN: ${{ github.token }}
- name: Release Plugin
if: github.ref == 'refs/heads/main'
uses: rajatjindal/spin-plugin-releaser@v1
with:
github_token: ${{ github.token }}
upload_checksums: true
template_file: contrib/spin-plugin.json.tmpl