Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to GH Actions #67

Merged
merged 2 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Go Check
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.20.x, 1.21.x, 1.22.x]
eternal-flame-AD marked this conversation as resolved.
Show resolved Hide resolved
steps:
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
stable: true

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Get dependencies
run: go get -v -t -d ./...

- name: Test
run: go test ./...
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
workflow_run:
workflows: ["Go Check"]
types:
- completed
branches:
- master

jobs:
release:

runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: 1.22.x
stable: true

- name: Get dependencies
run: go get -v -t -d ./...

- name: Build
run: |
TAG=$(git describe --tags --abbrev=0)
GIT_TAG=$TAG make clean build

- name: Create release
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
files: build/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
name: Release ${{ github.ref }}
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @gotify/committers
Loading