Skip to content

Commit

Permalink
Added github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dop251 committed Oct 1, 2021
1 parent f6b7a51 commit 9339e2d
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.16.x, 1.x]
os: [ubuntu-latest]
arch: ["", "386"]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Run tests
env:
GOARCH: ${{ matrix.arch }}
run: go test ./...
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
on:
release:
types: [created]

jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin]
goarch: [amd64, arm64, arm]
exclude:
- goarch: arm
goos: darwin
steps:
- uses: actions/checkout@v2
- uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
project_path: "./diskrsync"
binary_name: "diskrsync"

0 comments on commit 9339e2d

Please sign in to comment.