Skip to content

Commit b01f0c7

Browse files
author
mirkobrombin
committed
ci: add gh workflows
1 parent cd37c67 commit b01f0c7

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed

.github/workflows/continuous.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up Go
15+
uses: actions/setup-go@v5
16+
with:
17+
go-version: 1.22
18+
19+
- name: Test
20+
run: go test -v ./...
21+
22+
- name: Build
23+
run: go build -o goup cmd/goup/main.go
24+
25+
- uses: softprops/action-gh-release@v1
26+
with:
27+
token: "${{ secrets.GITHUB_TOKEN }}"
28+
tag_name: "continuous"
29+
prerelease: true
30+
name: "Continuous Build"
31+
files: |
32+
goup
33+
34+
- uses: actions/upload-artifact@v4
35+
with:
36+
name: goup
37+
path: |
38+
goup

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
container:
12+
image: ghcr.io/vanilla-os/pico:main
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v5
19+
with:
20+
go-version: 1.22
21+
22+
- name: Test
23+
run: go test -v ./...
24+
25+
- name: Build
26+
run: go build -o goup cmd/goup/main.go
27+
28+
- uses: softprops/action-gh-release@v1
29+
with:
30+
token: "${{ secrets.GITHUB_TOKEN }}"
31+
files: |
32+
goup

0 commit comments

Comments
 (0)