diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 6703e71..8e1fcd4 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -11,7 +11,7 @@ jobs: name: Test runs-on: ubuntu-latest steps: - - name: Set up Go 1.x + - name: Set up Go uses: actions/setup-go@v2 with: go-version: ^1.14 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e37287d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + tags: + - "*" + +jobs: + build: + name: Release + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ^1.14 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..7b07b28 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,6 @@ +project_name: mylib-go +build: + skip: true +release: + github: + prerelease: auto