name: Create Draft release on: push: tags: - v1.** - v2.** env: KIND_VERSION: v0.17.0 KIND_NODE_IMAGE_TAG: v1.19.16 jobs: create-draft-release: runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@v3 with: fetch-depth: 0 - name: Setup go uses: actions/setup-go@v3 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@v3 with: install-only: true - name: Kind Clutser uses: engineerd/setup-kind@v0.5.0 with: image: kindest/node:${{ env.KIND_NODE_IMAGE_TAG }} version: ${{ env.KIND_VERSION }} config: kind.yaml - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Login to ghcr.io uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Login to docker.io uses: docker/login-action@v2 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@v3 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