Skip to content

Commit

Permalink
Migrate to GitHub Actions
Browse files Browse the repository at this point in the history
Signed-off-by: eternal-flame-AD <[email protected]>
  • Loading branch information
eternal-flame-AD committed Aug 1, 2024
1 parent 091c687 commit 5d14e4b
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 21 deletions.
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]
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@v2

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

- name: Test
run: go test ./...
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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@v2

- 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
if: startsWith(github.ref, 'refs/tags/v')
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.

0 comments on commit 5d14e4b

Please sign in to comment.