diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e76128..e39c8aa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,15 +58,22 @@ jobs: with: node-version: '24' registry-url: 'https://registry.npmjs.org' + - name: Install dependencies + if: steps.version.outputs.version_tag != '' run: npm ci - name: Update package version if: steps.version.outputs.version_tag != '' run: npm version ${{ steps.version.outputs.version }} --no-git-tag-version - - name: Publish to npm + - name: Run GoReleaser if: steps.version.outputs.version_tag != '' - run: npm publish --access public + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: latest + args: release --clean env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 0490c9b..8987e32 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -8,22 +8,19 @@ before: - npm ci - npm run build -builds: - - id: cloudflare-crawl-mcp - dir: . - env: - - CGO_ENABLED=0 - goos: - - linux - - darwin - - windows - goarch: - - amd64 - - arm64 - archives: - id: default format: tarball + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + files: + - dist/**/* + - package.json + - README.md + - LICENSE + +source: + enabled: true + name_template: "{{ .ProjectName }}_{{ .Version }}_source" snapshot: name_template: "{{ .Tag }}-next" @@ -42,21 +39,11 @@ release: name: cloudflare-crawl-mcp draft: false -npm: - name: "@lukaszraczylo/cloudflare-crawl-mcp" - license: MIT - author: "Lukasz Raczylo " - repository: https://github.com/lukaszraczylo/cloudflare-crawl-mcp - access: public - channel: "latest" - dir: "." - skip_upload: false - scripts: - post_pack: npm run build - keywords: - - cloudflare - - crawl - - mcp - - browser rendering - description: "A MCP tool to crawl Cloudflare's Browser Rendering API and extract data from the rendered pages." +publishers: + - name: npm + cmd: npm publish --access public + env: + - NODE_AUTH_TOKEN={{ .Env.NPM_TOKEN }} + dir: "." + disable: "{{ .IsSnapshot }}"