Skip to content

[Dispatch] Release

[Dispatch] Release #15

name: "[Dispatch] Release"
on:
workflow_dispatch:
inputs:
version:
description: "enter version(x.y.z)"
required: true
default: "0.0.0"
container_arch:
type: choice
description: "choose container architecture"
default: linux/amd64
options:
- "linux/amd64"
- "linux/amd64,linux/arm64"
env:
ARCH: ${{ github.event.inputs.container_arch }}
VERSION: ${{ github.event.inputs.version }}
PACKAGE_VERSION: ${{ github.event.inputs.version }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
jobs:
tagging:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT_TOKEN }}
- name: tagging
run: |
git config user.email [email protected]
git config user.name cloudforet-admin
git tag ${{ env.VERSION }}
git push origin ${{ env.VERSION }}
- name: Notice when job fails
if: failure()
uses: 8398a7/[email protected]
with:
status: ${{job.status}}
fields: repo,workflow,job
author_name: Github Action Slack
build:
needs: tagging
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.23.1"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
- name: Notice when job fails
if: failure()
uses: 8398a7/[email protected]
with:
status: ${{job.status}}
fields: repo,workflow,job
author_name: Github Action Slack