Skip to content

Commit ae976e2

Browse files
Migrate to GH Actions (#67)
* Migrate to GitHub Actions * Add CODEOWNERS file --------- Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
1 parent 091c687 commit ae976e2

4 files changed

Lines changed: 68 additions & 21 deletions

File tree

.github/workflows/check.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Go Check
2+
on: [push, pull_request]
3+
jobs:
4+
check:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
go: [1.20.x, 1.21.x, 1.22.x]
9+
steps:
10+
- name: Setup Go environment
11+
uses: actions/setup-go@v5
12+
with:
13+
go-version: ${{ matrix.go }}
14+
stable: true
15+
16+
- name: Check out code into the Go module directory
17+
uses: actions/checkout@v4
18+
19+
- name: Get dependencies
20+
run: go get -v -t -d ./...
21+
22+
- name: Test
23+
run: go test ./...

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Go Check"]
6+
types:
7+
- completed
8+
branches:
9+
- master
10+
11+
jobs:
12+
release:
13+
14+
runs-on: ubuntu-latest
15+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Go environment
22+
uses: actions/setup-go@v5
23+
with:
24+
go-version: 1.22.x
25+
stable: true
26+
27+
- name: Get dependencies
28+
run: go get -v -t -d ./...
29+
30+
- name: Build
31+
run: |
32+
TAG=$(git describe --tags --abbrev=0)
33+
GIT_TAG=$TAG make clean build
34+
35+
- name: Create release
36+
if: startsWith(github.ref, 'refs/tags/v')
37+
uses: svenstaro/upload-release-action@v2
38+
with:
39+
repo_token: ${{ secrets.GITHUB_TOKEN }}
40+
files: build/*
41+
tag: ${{ github.ref }}
42+
overwrite: true
43+
file_glob: true
44+
name: Release ${{ github.ref }}

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @gotify/committers

0 commit comments

Comments
 (0)