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: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
release: | |
description: 'Release tag' | |
required: true | |
previous-tag: | |
description: 'Previous release tag' | |
required: true | |
jobs: | |
release: | |
name: Release | |
if: ${{ github.repository == 'shipwright-io/cli' }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # To be able to update releases | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.inputs.release }} | |
fetch-depth: 0 | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.19.x' | |
cache: true | |
check-latest: true | |
- name: Build Release Changelog | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PREVIOUS_TAG: ${{ github.event.inputs.previous-tag }} | |
# This creates a set of release notes at Changes.md | |
run: | | |
export GITHUB_TOKEN | |
export PREVIOUS_TAG | |
"${GITHUB_WORKSPACE}/.github/draft_release_notes.sh" | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v2 | |
with: | |
version: latest | |
args: release --rm-dist --release-notes /tmp/release-notes/Changes.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |