Skip to content

Commit 8aee4ee

Browse files
authored
Merge pull request #16 from lazy-electron-consulting/2-cross-compile
expand workflows build releases
2 parents 07c71e1 + 3a458f5 commit 8aee4ee

File tree

3 files changed

+39
-4
lines changed

3 files changed

+39
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ on:
55
- "go.sum"
66
- "go.mod"
77
- "**.go"
8-
- ".github/workflows/ci.yaml"
98
- "Makefile"
10-
push:
11-
branches: [main]
9+
- ".github/workflows/ci.yaml"
1210

1311
jobs:
1412
build:

.github/workflows/pre-release.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: "pre-release"
22
on:
33
push:
44
branches: [main]
5+
paths:
6+
- "go.sum"
7+
- "go.mod"
8+
- "**.go"
9+
- "Makefile"
10+
- ".github/workflows/pre-release.yaml"
511

612
jobs:
713
pre-release:
@@ -17,6 +23,7 @@ jobs:
1723
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
1824
restore-keys: |
1925
${{ runner.os }}-go-
26+
- run: make test
2027
- run: make release
2128

2229
- uses: "marvinpinto/[email protected]"
@@ -26,4 +33,5 @@ jobs:
2633
prerelease: true
2734
title: "Development Build"
2835
files: |
29-
dist/*
36+
dist/*
37+
LICENSE

.github/workflows/release.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "release"
2+
on:
3+
push:
4+
tags: ["v*"]
5+
6+
jobs:
7+
tagged-release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-go@v2
12+
with:
13+
go-version: '1.18'
14+
- uses: actions/cache@v2
15+
with:
16+
path: ~/go/pkg/mod
17+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
18+
restore-keys: |
19+
${{ runner.os }}-go-
20+
- run: make test
21+
- run: make release
22+
23+
- uses: "marvinpinto/[email protected]"
24+
with:
25+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
26+
prerelease: false
27+
files: |
28+
dist/*
29+
LICENSE

0 commit comments

Comments
 (0)