Files
fission-src/.github/workflows/release.yaml
T
Sanket SudakeandGitHub c09319ceb3 Update CI actions and go modules (#2846)
* Update CI actions and go modules
* Fix kind cluster name
* Fix upgrade cluster name

---

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-10-12 10:13:47 +05:30

92 lines
2.4 KiB
YAML

name: Create Draft release
on:
push:
tags:
- v1.**
- v2.**
env:
KIND_VERSION: v0.20.0
KIND_NODE_IMAGE_TAG: v1.23.17
KIND_CLUSTER_NAME: kind
jobs:
create-draft-release:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup go
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
install-only: true
- name: Kind Clutser
uses: helm/kind-action@v1.8.0
with:
node_image: kindest/node:${{ env.KIND_NODE_IMAGE_TAG }}
version: ${{ env.KIND_VERSION }}
config: kind.yaml
cluster_name: ${{ env.KIND_CLUSTER_NAME }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to docker.io
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Install Cosign
uses: sigstore/cosign-installer@main
with:
cosign-release: 'v1.12.0'
- name: Check cosign install!
run: cosign version
- name: Write cosign signing key to disk
run: 'echo "$KEY" > cosign.key'
shell: bash
env:
KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
- name: Generate yaml for manifest, Minikube and Openshift installation
run: ${GITHUB_WORKSPACE}/hack/build-yaml.sh $VERSION
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
shell: bash
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release
env:
COSIGN_PWD: ${{ secrets.COSIGN_PWD }}
GORELEASER_CURRENT_TAG: ${{ steps.get_version.outputs.VERSION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_CLI_EXPERIMENTAL: "enabled"
#ToDo - Verify and upload releases