Skip to content

Commit

Permalink
Merge pull request #2 from 01node/micovi-patch-2
Browse files Browse the repository at this point in the history
Create master.yml
  • Loading branch information
micovi committed Jan 16, 2024
2 parents 010a3ea + 0955f28 commit 2b53139
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build and Release

on:
push:
branches: [ master ]
tags: [ '*.*.*' ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: '^1.17.0'
- name: Tidy
run: |
go mod tidy
- name: Build
run: |
go build
- name: Test
run: |
go test -race -shuffle=on
github-publish:
# Only publish if all other jobs succeed
needs:
- test
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: '^1.20.0'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 2b53139

Please sign in to comment.