name: release on: push: tags: [ 'v*' ] jobs: goreleaser: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Unshallow run: git fetch --prune --unshallow - name: Setup Go uses: actions/setup-go@v2 with: go-version: 1.17.x - name: Setup QEMU uses: docker/setup-qemu-action@v1 with: platforms: all - name: Setup Docker Buildx id: buildx uses: docker/setup-buildx-action@v1 with: buildkitd-flags: "--debug" - name: Login to GitHub Container Registry uses: docker/login-action@v1 with: registry: ghcr.io username: fluxcdbot password: ${{ secrets.GHCR_TOKEN }} - name: Login to Docker Hub uses: docker/login-action@v1 with: username: fluxcdbot password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }} - name: Download release notes utility env: GH_REL_URL: https://github.com/buchanae/github-release-notes/releases/download/0.2.0/github-release-notes-linux-amd64-0.2.0.tar.gz run: cd /tmp && curl -sSL ${GH_REL_URL} | tar xz && sudo mv github-release-notes /usr/local/bin/ - name: Generate release notes run: | echo 'CHANGELOG' > /tmp/release.txt github-release-notes -org fluxcd -repo toolkit -since-latest-release -include-author >> /tmp/release.txt env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Setup Kustomize uses: fluxcd/pkg//actions/kustomize@main - name: Generate manifests run: | make cmd/flux/.manifests.done ./manifests/scripts/bundle.sh "" ./output manifests.tar.gz kustomize build ./manifests/install > ./output/install.yaml - name: Build CRDs run: | kustomize build manifests/crds > all-crds.yaml # Pinned to commit before https://github.com/fluxcd/pkg/pull/189 due to # introduction faulty behavior. - name: Generate OpenAPI JSON schemas from CRDs uses: fluxcd/pkg//actions/crdjsonschema@49e26aa2ee9e734c3233c560253fd9542afe18ae with: crd: all-crds.yaml output: schemas - name: Archive the OpenAPI JSON schemas run: | tar -czvf ./output/crd-schemas.tar.gz -C schemas . - name: Run GoReleaser uses: goreleaser/goreleaser-action@v1 with: version: latest args: release --release-notes=/tmp/release.txt --skip-validate env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} AUR_BOT_SSH_PRIVATE_KEY: ${{ secrets.AUR_BOT_SSH_PRIVATE_KEY }}