name: Create Draft release on: push: tags: - v1.** - v2.** env: KIND_VERSION: v0.23.0 KIND_NODE_IMAGE_TAG: v1.25.16 KIND_CLUSTER_NAME: kind jobs: create-draft-release: runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: fetch-depth: 0 - name: Setup go uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 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@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 with: install-only: true - name: Kind Clutser uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.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@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - name: Login to ghcr.io uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Login to docker.io uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Install Cosign uses: sigstore/cosign-installer@1fc5bd396d372bee37d608f955b336615edf79c8 # v3.2.0 with: cosign-release: "v2.2.1" - 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@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 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