[Dispatch] Release #2
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: "[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 admin@cloudforet.io | |
git config user.name cloudforet-admin | |
git tag ${{ env.VERSION }} | |
git push origin ${{ env.VERSION }} | |
- name: Notice when job fails | |
if: failure() | |
uses: 8398a7/action-slack@v3.15.0 | |
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 }} | |
- name: Notice when job fails | |
if: failure() | |
uses: 8398a7/action-slack@v3.15.0 | |
with: | |
status: ${{job.status}} | |
fields: repo,workflow,job | |
author_name: Github Action Slack |