Merge pull request #423 from alexander-demicev/cherrypick-422 #26
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: | |
TAG: ${{ github.ref_name }} | |
REGISTRY: ghcr.io | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: setupGo | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '=1.21.8' | |
- name: Docker login | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build docker image | |
run: make docker-build-all TAG=${{ env.TAG }} | |
- name: Push docker image | |
run: make docker-push-all TAG=${{ env.TAG }} PROD_REGISTRY=${{ env.REGISTRY }} | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
needs: [build] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: setupGo | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '=1.21.8' | |
- name: Update manifests | |
run: | | |
make release RELEASE_TAG=${{ env.TAG }} | |
- name: Release | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create ${{ env.TAG }} --draft --generate-notes | |
gh release upload ${{ env.TAG }} out/metadata.yaml | |
gh release upload ${{ env.TAG }} out/bootstrap-components.yaml | |
gh release upload ${{ env.TAG }} out/control-plane-components.yaml |