From 542a7fd8a63e4697c1add0ef9aac884227d08be6 Mon Sep 17 00:00:00 2001 From: William Poussier Date: Tue, 31 Aug 2021 02:47:19 +0200 Subject: [PATCH] chore: add goreleaser Github workflow --- .github/workflows/ci.yml | 6 +++--- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ .gitignore | 1 + .goreleaser.yml | 11 +++++++++++ 4 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml create mode 100644 .goreleaser.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ed682d..818734b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,9 +16,9 @@ jobs: fail-fast: false matrix: go: - - "1.13.x" - - "1.14.x" - "1.15.x" + - "1.16.x" + - "1.17.x" os: - ubuntu-latest - macos-latest @@ -45,7 +45,7 @@ jobs: fail-fast: false matrix: go: - - "1.15.x" + - "1.17.x" steps: - name: Install Go uses: actions/setup-go@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..524def9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: release + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 70e0ae4..df53c3b 100644 --- a/.gitignore +++ b/.gitignore @@ -46,6 +46,7 @@ vendor/ Godeps/ # CI/CD +coverage.txt benchstats .benchruns .benchstats.csv diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..ea34dd0 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,11 @@ +project_name: jettison +builds: + - skip: true +release: + github: + owner: wI2L + name: jettison + draft: true + prerelease: auto +env_files: + github_token: ~/.goreleaser_github_token