Skip to content

Release 🚀

Release 🚀 #7

Workflow file for this run

name: Release build
on:
workflow_dispatch:
inputs:
tag:
type: string
required: true
description: "Git tag to create(e.g. v1.0.0 or v1.0.0-rc1)"
prerelease:
type: boolean
description: "Mark prerelease or not"
jobs:
fix_version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: update-action-test
- name: Update-version
run: make update-version VERSION=${{ inputs.tag }}
- name: Commit updates
uses: EndBug/add-and-commit@v7
with:
branch: update-action-test
message: "Bump version: ${{ inputs.tag }}"
outputs:
version: ${{ inputs.tag }}
goreleaser:
runs-on: ubuntu-latest
needs:
- fix_version
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: update-action-test
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.20"
- name: Create tag (not push)
run: |
git tag "${{ needs.fix_version.outputs.version }}"
# git push origin "${{ needs.fix_version.outputs.version }}"
- name: Delete drafts
uses: hugo19941994/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: release-drafter
uses: release-drafter/release-drafter@v5
with:
tag: ${{ needs.fix_version.outputs.version }}
version: ${{ needs.fix_version.outputs.version }}
prerelease: ${{ inputs.prerelease }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# controller-manager:
# runs-on: ubuntu-latest
# needs:
# - fix_version
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# ref: update-action-test
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v1
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build and push
# id: docker_build
# uses: docker/build-push-action@v2
# with:
# push: true
# file: dockerfile/controller-manager.Dockerfile
# tags: ${{ 'ghcr.io/' }}${{ github.repository }}${{ '-controller-manager' }}:${{ needs.fix_version.outputs.version }}
# - name: Image digest
# run: echo ${{ steps.docker_build.outputs.digest }}
# dashboard:
# runs-on: ubuntu-latest
# needs:
# - fix_version
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# ref: update-action-test
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v1
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build and push
# id: docker_build
# uses: docker/build-push-action@v2
# with:
# push: true
# file: dockerfile/dashboard.Dockerfile
# tags: ${{ 'ghcr.io/' }}${{ github.repository }}${{ '-dashboard' }}:${{ needs.fix_version.outputs.version }}
# - name: Image digest
# run: echo ${{ steps.docker_build.outputs.digest }}
# traefik-plugins:
# runs-on: ubuntu-latest
# needs:
# - fix_version
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# ref: update-action-test
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v1
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build and push
# id: docker_build
# uses: docker/build-push-action@v2
# with:
# push: true
# file: dockerfile/traefik-plugins.Dockerfile
# tags: ${{ 'ghcr.io/' }}${{ github.repository }}${{ '-traefik-plugins' }}:${{ needs.fix_version.outputs.version }}
# - name: Image digest
# run: echo ${{ steps.docker_build.outputs.digest }}