Simplify conditional expressions in reading utilities (#75) #150
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: Publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Test | |
| uses: ./.github/workflows/test.yml | |
| secrets: inherit | |
| permissions: | |
| contents: read | |
| id-token: write | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| needs: test | |
| permissions: | |
| id-token: write | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Setup toolchains | |
| uses: jdx/mise-action@be3be2260bc02bc3fbf94c5e2fed8b7964baf074 # v3.4.0 | |
| - name: Setup Socket Firewall | |
| uses: SocketDev/action@4337a545deecc20f19a909e52db7a2f6ba292f42 # v1.2.0 | |
| with: | |
| mode: firewall | |
| - name: Install Dependencies | |
| run: sfw pnpm install | |
| - name: Update npm | |
| run: sfw npm install -g npm@latest | |
| - name: Create Release Pull Request or Publish to npm | |
| uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # v1.5.3 | |
| id: changesets | |
| with: | |
| publish: pnpm release | |
| commitMode: 'github-api' | |
| title: 'Release new version' | |
| commit: 'chore(release): bump new version' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish to JSR | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| jq --arg version "$VERSION" '.version = $version' jsr.json > jsr.json.tmp | |
| mv jsr.json.tmp jsr.json | |
| pnpm dlx jsr publish --allow-dirty | |
| if: steps.changesets.outputs.published == 'true' |