Skip to content

Add Makefile (#14)

Add Makefile (#14) #7

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.21"
- 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/[email protected]
with:
version: latest
args: release --clean ${{ github.ref == 'refs/heads/main' && '--snapshot' || '' }}
- 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-k8s*.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: .spin-plugin.json.tmpl