-
Notifications
You must be signed in to change notification settings - Fork 49
49 lines (45 loc) · 1.27 KB
/
create-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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 }}