This repository was archived by the owner on Apr 2, 2026. It is now read-only.
fix: ensure postinstall setup runs and is visible #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| goreleaser: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| npm-publish: | |
| runs-on: ubuntu-latest | |
| needs: goreleaser | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Update package.json version | |
| run: | | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| npm version "$VERSION" --no-git-tag-version --allow-same-version | |
| - name: Publish to npm | |
| run: | | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| if npm view "uncompact@$VERSION" version >/dev/null 2>&1; then | |
| echo "uncompact@$VERSION already exists on npm; skipping publish." | |
| exit 0 | |
| fi | |
| npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.SUPERMODEL_NPM_TOKEN }} |