Create release #12
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: Create release | |
on: | |
workflow_run: | |
workflows: [ "Create, Scan and Publish KDM image" ] | |
types: [completed] | |
branches: [release-**] | |
permissions: | |
contents: write | |
packages: write | |
env: | |
GO_VERSION: '1.20' | |
jobs: | |
create-release: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Set up Go ${{ env.GO_VERSION }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Download Image Tags | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
name: image_tags | |
workflow: ci.yml | |
run_id: ${{ github.event.workflow_run.id }} | |
path: ${{ github.workspace }} | |
- name: Read Image Tags | |
run: | | |
echo "IMAGE_TAG=$(cat ${{ github.workspace }}/IMAGE_TAG)" >> $GITHUB_ENV | |
- name: Get tag | |
run: | | |
git tag ${{ env.IMAGE_TAG }} | |
- name: Goreleaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
version: latest | |
args: release --rm-dist --timeout 60m --debug | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |