diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 575db91..729d69b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,16 +19,6 @@ jobs: steps: - uses: actions/checkout@v4 - # - name: Cache Go modules - # uses: actions/cache@v4 - # with: - # path: | - # ~/go/pkg/mod - # ~/.cache/go-build - # key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - # restore-keys: | - # ${{ runner.os }}-go- - - name: Set up Go uses: actions/setup-go@v5 with: @@ -64,3 +54,23 @@ jobs: - name: Cleanup run: make clean + + release: + runs-on: ubuntu-latest + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ^1.22 + + - name: Install GoReleaser + run: go install github.com/goreleaser/goreleaser@latest + + - name: Run GoReleaser + run: goreleaser release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.gitignore b/.gitignore index f0c6ae4..aecd836 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ coverage* /.coverage/ +/dist/ # Created by https://www.toptal.com/developers/gitignore/api/certificates,ssh,dotenv,go,compressed,visualstudiocode,macos,windows,linux # Edit at https://www.toptal.com/developers/gitignore?templates=certificates,ssh,dotenv,go,compressed,visualstudiocode,macos,windows,linux diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..220c737 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,29 @@ +version: 2 + +project_name: cef-parser-go + +builds: + - skip: true + +archives: + - format: tar.gz + files: + - LICENSE + - README.md + - go.mod + - parser/**/*.go + +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' + +release: + github: + owner: ren3gadem4rm0t + name: cef-parser-go + draft: false + prerelease: false +