update release pipeline #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
branches: | |
- ikp | |
jobs: | |
build: | |
permissions: write-all | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3.3.0 | |
- name: Get Go version | |
id: go_version | |
run: echo "VERSION=$(make go-version)" >> $GITHUB_OUTPUT | |
- name: Install Go | |
uses: actions/setup-go@v3.5.0 | |
with: | |
go-version: ${{ steps.go_version.outputs.VERSION }} | |
- name: Setup Go env | |
run: go env -w CGO_ENABLED=0 | |
- name: Build | |
run: make build | |
- name: Get k9s version | |
id: version | |
run: zip k9s.zip execs/*;echo "VERSION=$(make version)" >> $GITHUB_OUTPUT | |
- name: Release | |
uses: ncipollo/release-action@v1.14.0 | |
with: | |
allowUpdates: true | |
tag: "${{ steps.version.outputs.VERSION }}-${{ github.ref_name }}" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: k9s.zip |