Merge pull request #333 from ffromani/add-context-0.20 #76
Workflow file for this run
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: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
release: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: checkout sources | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: setup golang | |
uses: actions/setup-go@v5 | |
id: go | |
with: | |
go-version: 1.21.7 | |
- name: verify modules | |
run: go mod verify | |
- name: set release version env var | |
run: | | |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: build test binary | |
run: | | |
go version | |
make build-e2e | |
- name: build tool | |
run: | | |
go version | |
make | |
- name: render manifests | |
run: | | |
make release-manifests-k8s | |
- name: create K8S kind cluster | |
run: | | |
# kind is part of 20.04 image, see: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md | |
kind version | |
# see image listing in https://github.com/kubernetes-sigs/kind/releases/tag/v0.20.0 | |
kind create cluster --config=hack/kind-config-e2e-positive.yaml --image kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72 | |
kubectl label node kind-worker node-role.kubernetes.io/worker='' | |
- name: run E2E tests | |
run: | | |
_out/e2e.test --ginkgo.v --ginkgo.label-filter='release' | |
- name: fix build artifacts | |
run: | | |
hack/make-release-binaries.sh ${{ env.RELEASE_VERSION }} | |
- name: compute signature | |
run: | | |
hack/make-release-checksum.sh ${{ env.RELEASE_VERSION }} | |
- name: create release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "SHA256SUMS,deployer-v*-linux-amd64.gz,deployer-v*.yaml" | |
token: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
- name: export kind logs | |
if: ${{ failure() }} | |
run: | | |
kind export logs /tmp/kind-logs | |
- name: archive kind logs | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: kind-logs | |
path: /tmp/kind-logs |