Merge pull request #33 from quran/changeset-release/main #12
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"] | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| env: | |
| HUSKY: 0 | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| packages: write | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: Setup | |
| uses: ./.github/setup | |
| - name: Build | |
| run: pnpm build --filter=./packages/* | |
| - name: Create Release Pull Request or Publish to npm | |
| id: changesets | |
| uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # v1.5.3 | |
| with: | |
| commit: "chore(release): 📦 version packages" | |
| title: "chore(release): 📦 version packages" | |
| publish: pnpm run release | |
| version: pnpm run version | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Use OIDC for npm authentication instead of NPM_TOKEN | |
| NPM_TOKEN: "" # https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868 | |
| # - name: Send a Slack notification if a publish happens | |
| # if: steps.changesets.outputs.published == 'true' | |
| # # You can do something when a publish happens. | |
| # run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!" |