Skip to content

Commit 73db562

Browse files
committed
Create Release action
1 parent ea22ff9 commit 73db562

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: 'release'
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
pre-release:
13+
# Builds for 3 most common targets on pushes to main and then publishes a release
14+
name: 'Semver Release Hook'
15+
runs-on: 'ubuntu-latest'
16+
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@v4.1.2
20+
21+
- name: Setup Go environment
22+
uses: actions/setup-go@v5.0.0
23+
with:
24+
go-version-file: go.mod
25+
26+
- name: Build Linux amd64
27+
run: GOOS=linux GOARCH=amd64 go build -o cryptool_linux
28+
29+
- name: Build Windows amd64
30+
run: GOOS=windows GOARCH=amd64 go build -o cryptool_win.exe
31+
32+
- name: Build Darwin arm64
33+
run: GOOS=darwin GOARCH=arm64 go build -o cryptool_darwin
34+
35+
- name: Generate Pre-Release
36+
uses: 'marvinpinto/action-automatic-releases@latest'
37+
with:
38+
repo_token: '${{ secrets.GITHUB_TOKEN }}'
39+
prerelease: false
40+
files: |
41+
cryptool_linux
42+
cryptool_win.exe
43+
cryptool_darwin

0 commit comments

Comments
 (0)