chore: bump version to 1.0.1 in package.json #11
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: [master] | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| permissions: | |
| id-token: write | |
| contents: write | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'astro-api/astroapi-typescript' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'npm' | |
| - run: npm ci | |
| - run: npm run build | |
| - run: npm run test:coverage | |
| - name: Check for changesets | |
| id: changesets | |
| run: | | |
| if ls .changeset/*.md 1> /dev/null 2>&1 && [ "$(ls .changeset/*.md 2>/dev/null | grep -v README.md)" ]; then | |
| echo "has_changesets=true" >> $GITHUB_OUTPUT | |
| echo "Pending changesets found - skipping publish" | |
| else | |
| echo "has_changesets=false" >> $GITHUB_OUTPUT | |
| echo "No pending changesets - ready to publish" | |
| fi | |
| - name: Publish to npm | |
| if: steps.changesets.outputs.has_changesets == 'false' | |
| run: npm publish --provenance --access public | |
| - name: Get package version | |
| if: steps.changesets.outputs.has_changesets == 'false' | |
| id: version | |
| run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| - name: Create GitHub Release | |
| if: steps.changesets.outputs.has_changesets == 'false' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ steps.version.outputs.version }} | |
| generate_release_notes: true |