Merge pull request #597 from jetstack/readme-venctl #6
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: | |
tags: | |
- "v*" | |
env: | |
VERSION: ${{ github.ref_name }} | |
jobs: | |
build_images: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # needed for checkout | |
id-token: write # needed for keyless signing & google auth | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/repo_access | |
with: | |
DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB: ${{ secrets.DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB }} | |
- id: go-version | |
run: | | |
make print-go-version >> "$GITHUB_OUTPUT" | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ steps.go-version.outputs.result }} | |
- uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USER }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- id: release | |
run: make -j release | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.release.outputs.RELEASE_HELM_CHART_NAME }}-${{ steps.release.outputs.RELEASE_HELM_CHART_VERSION }}.tgz | |
path: ${{ steps.release.outputs.RELEASE_HELM_CHART_TAR }} | |
if-no-files-found: error | |
outputs: | |
RELEASE_OCI_PREFLIGHT_IMAGE: ${{ steps.release.outputs.RELEASE_OCI_PREFLIGHT_IMAGE }} | |
RELEASE_OCI_PREFLIGHT_TAG: ${{ steps.release.outputs.RELEASE_OCI_PREFLIGHT_TAG }} | |
RELEASE_HELM_CHART_NAME: ${{ steps.release.outputs.RELEASE_HELM_CHART_NAME }} | |
RELEASE_HELM_CHART_VERSION: ${{ steps.release.outputs.RELEASE_HELM_CHART_VERSION }} | |
github_release: | |
runs-on: ubuntu-latest | |
needs: build_images | |
permissions: | |
contents: write # needed for creating a PR | |
pull-requests: write # needed for creating a PR | |
steps: | |
- run: | | |
touch .notes-file | |
echo "OCI_PREFLIGHT_IMAGE: ${{ needs.build_images.outputs.RELEASE_OCI_PREFLIGHT_IMAGE }}" >> .notes-file | |
echo "OCI_PREFLIGHT_TAG: ${{ needs.build_images.outputs.RELEASE_OCI_PREFLIGHT_TAG }}" >> .notes-file | |
echo "HELM_CHART_NAME: ${{ needs.build_images.outputs.RELEASE_HELM_CHART_NAME }}" >> .notes-file | |
echo "HELM_CHART_VERSION: ${{ needs.build_images.outputs.RELEASE_HELM_CHART_VERSION }}" >> .notes-file | |
- id: chart_download | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ needs.build_images.outputs.RELEASE_HELM_CHART_NAME }}-${{ needs.build_images.outputs.RELEASE_HELM_CHART_VERSION }}.tgz | |
- env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create "$VERSION" \ | |
--repo="$GITHUB_REPOSITORY" \ | |
--title="${VERSION}" \ | |
--draft \ | |
--verify-tag \ | |
--notes-file .notes-file | |
gh release upload "$VERSION" \ | |
--repo="$GITHUB_REPOSITORY" \ | |
"${{ steps.chart_download.outputs.download-path }}/${{ needs.build_images.outputs.RELEASE_HELM_CHART_NAME }}-${{ needs.build_images.outputs.RELEASE_HELM_CHART_VERSION }}.tgz" |