Skip to content

Commit 5327ad5

Browse files
authored
Create release.yaml
1 parent e4785fa commit 5327ad5

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/release.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- "v*"
6+
jobs:
7+
Release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
13+
- name: Setup Go
14+
uses: actions/setup-go@v5
15+
with:
16+
go-version: '1.21.x'
17+
18+
- name: Get the version
19+
id: get_version
20+
run: |
21+
echo "APPSETTINGS_VERSION=$(git describe --tags --always --abbrev=7)" >> $GITHUB_OUTPUT
22+
- name: Build
23+
run: |
24+
GOOS=windows GOARCH=amd64 go build -o telegram_notify_action_${{ steps.get_version.outputs.APPSETTINGS_VERSION }}.exe
25+
GOOS=linux GOARCH=amd64 go build -o telegram_notify_action_${{ steps.get_version.outputs.APPSETTINGS_VERSION }}
26+
- name: Release
27+
uses: softprops/action-gh-release@v2
28+
# if: startsWith(github.ref, 'refs/tags/')
29+
with:
30+
files: |
31+
telegram_notify_action_${{ steps.get_version.outputs.APPSETTINGS_VERSION }}.exe
32+
telegram_notify_action_${{ steps.get_version.outputs.APPSETTINGS_VERSION }}
33+

0 commit comments

Comments
 (0)