Version Packages (#28) #3
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
| # Release workflow for the main branch (1.x versions) | |
| # This workflow handles releases for the 1.x version line of rescript-bun. | |
| # It only triggers on pushes to the main branch to ensure 1.x releases are properly managed. | |
| name: Release (1.x) | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Use Node.js 20.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build project | |
| run: bun run build | |
| # This workflow is specifically for 1.x releases on the main branch | |
| # The changeset action will handle version bumps according to changeset config | |
| - name: Create Release Pull Request or Publish to npm (1.x releases) | |
| uses: changesets/action@v1 | |
| with: | |
| publish: bun run release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |