-
Notifications
You must be signed in to change notification settings - Fork 171
59 lines (50 loc) · 1.52 KB
/
release-on-tag.yaml
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
50
51
52
53
54
55
56
57
58
59
name: Release
on:
push:
tags:
- "v*" # v0.8.1
jobs:
build:
name: Create Release on Tag
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Check sdk-version file
run: |
SDK_VERSION="$(head -n1 version/sdk-version)"
SDK_VERSION_GIT="refs/tags/${SDK_VERSION}"
if [[ "${SDK_VERSION_GIT}" != "${{ github.ref }}" ]]; then
echo "File version/sdk-version (${SDK_VERSION}) needs to be updated to ${{ github.ref }}"
exit 1
fi
shell: bash
- name: Tidy
run: make tidy
- name: Test
run: make test
- name: Version
run: |
echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV
- name: Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: Automatic Go Dapr client release
draft: false
prerelease: false
- name: Notify
uses: rjstone/discord-webhook-notify@v1
with:
severity: info
details: Release ${{ github.ref }} published
description: Release
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }}
avatarUrl: https://github.githubassets.com/images/modules/logos_page/Octocat.png