Skip to content

Commit

Permalink
maint: add release workflow (#18)
Browse files Browse the repository at this point in the history
* maint: add release workflow

* publish before updating manifest
  • Loading branch information
lizthegrey authored Dec 11, 2023
1 parent 2cc0cc0 commit b1bcbd9
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Release YAML

on:
release:
types:
- 'created'

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: '^1.21.5'
- uses: actions/checkout@v4
- uses: ko-build/setup-ko@v0.6
- run: ko build
publish-release-yaml:
name: Publish Release YAML
runs-on: ubuntu-latest
needs: Publish
steps:
- uses: actions/setup-go@v5
with:
go-version: '^1.21.5'
- uses: actions/checkout@v4
- uses: ko-build/setup-ko@v0.6
- name: Generate and upload release.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag=$(echo ${{ github.ref }} | cut -c11-) # get tag name without tags/refs/ prefix.
ko resolve -t ${tag} -f config/ > release.yaml
gh release upload ${tag} release.yaml

0 comments on commit b1bcbd9

Please sign in to comment.