diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..371bd77 --- /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 + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: '~> v2' + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/go.yml b/.github/workflows/test.yml similarity index 50% rename from .github/workflows/go.yml rename to .github/workflows/test.yml index 5724b60..43b25a7 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,4 @@ -# This workflow will build a golang project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go - -name: Go +name: Test on: push: @@ -11,15 +8,13 @@ on: jobs: - build: + test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v4 + - uses: actions/setup-go@v5 with: - go-version: '1.22' + go-version-file: go.mod - name: Build run: go build -v ./...