Flytectl release #10
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: Flytectl release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "version. Do *not* use the `flytectl/` prefix, e.g. `flytectl/v1.2.3`, instead use only `v1.2.3` (including the `v`)" | |
required: true | |
jobs: | |
push-flytectl-tag: | |
name: Push git tag containing the `flyteidl/` prefix | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.FLYTE_BOT_PAT }} | |
script: | | |
github.rest.git.createRef({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
ref: `refs/tags/flytectl/${{ github.event.inputs.version }}`, | |
sha: context.sha | |
}) | |
release: | |
name: Goreleaser | |
needs: | |
- push-flytectl-tag | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.21" | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
distribution: goreleaser-pro | |
args: release --rm-dist -f flytectl/.goreleaser.yml | |
env: | |
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} | |
GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} |