Merge pull request #128 from PodleyAI/put-return #45
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: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: publish | |
| steps: | |
| - name: Check NPM_TOKEN presence | |
| run: | | |
| if [ -z "${{ secrets.NPM_TOKEN }}" ]; then | |
| echo "NPM_TOKEN is missing!" | |
| exit 1 | |
| else | |
| echo "NPM_TOKEN is available." | |
| fi | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| registry-url: "https://registry.npmjs.org/" | |
| always-auth: true | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| registry-url: "https://registry.npmjs.org/" | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build | |
| run: bun run build | |
| - name: Test | |
| run: bun run test | |
| - name: Create .npmrc | |
| run: | | |
| echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc | |
| - name: Create Release Pull Request or Publish to npm | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| version: bun run version | |
| publish: bun run publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |