Skip to content

Commit 7ccca69

Browse files
authored
Add release GHA (#5)
* ci: add winfowsgui build flag * ci: use Windows for PR build * ci: add release action * ci: set job name * fix: set correct release action * fix: update action tag * fix: uppdate runner * ci: update release action * doc: update build command * chore: enable PR action
1 parent 7526143 commit 7ccca69

File tree

3 files changed

+36
-4
lines changed

3 files changed

+36
-4
lines changed

.github/workflows/pull_request.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Pull Request
2-
2+
run-name: Pull Request on ${{ github.ref_name }} by @${{ github.actor }}
33

44
on:
55
- pull_request
@@ -10,7 +10,7 @@ jobs:
1010

1111
validate:
1212
runs-on:
13-
- macos-latest
13+
- windows-latest
1414
timeout-minutes: 15
1515
steps:
1616
- name: Checkout Code
@@ -22,7 +22,7 @@ jobs:
2222
- name: Vet
2323
run: go vet ./...
2424
- name: Build
25-
run: go build -v -o runsyncapps ./cmd
25+
run: go build -v -o runsyncapps -ldflags="-H windowsgui" ./cmd
2626

2727
vulnerability-check:
2828
runs-on:

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
run-name: Release on ${{ github.ref_name }} by @${{ github.actor }}
3+
4+
on:
5+
pull_request:
6+
types:
7+
- closed
8+
branches:
9+
- main
10+
11+
12+
jobs:
13+
14+
release:
15+
if: github.event.pull_request.merged == true
16+
runs-on:
17+
- ubuntu-latest
18+
timeout-minutes: 15
19+
steps:
20+
- name: Checkout Code
21+
uses: actions/checkout@v4
22+
with:
23+
ref: ${{ github.event.pull_request.merge_commit_sha }}
24+
fetch-depth: '0'
25+
- name: Bump version and push tag
26+
uses: anothrNick/[email protected]
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
WITH_V: true
30+
DRY_RUN: true

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ This small application allows to start multiple applications at once and if one
55
## Bulding
66

77
```shell
8-
go build -o="runsyncapps.exe" -ldflags="-H windowsgui" ./cmd/
8+
go build -o="runsyncapps.exe" ./cmd/
99
```
1010

11+
You can add the buyild flag `-ldflags="-H windowsgui"` to avoid the console to open when starting the app.
12+
1113
## Usage
1214

1315
```shell

0 commit comments

Comments
 (0)