diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..7a541ee --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,39 @@ +name: Go + +on: + push: + branches: [ main ] + tags: + - '*' + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + + - name: Test + run: go test -v ./... + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + with: + name: charly + path: dist/* \ No newline at end of file