publish #8
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: | |
| workflow_dispatch: | |
| jobs: | |
| publish_gh_packages: | |
| name: Publish to Github Packages | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| - name: pnpm setup | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: nodejs setup | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "lts/*" | |
| registry-url: "https://registry.npmjs.org" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: pnpm publish | |
| run: pnpm publish --access restricted | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| release: | |
| needs: publish_gh_packages | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # publish a GitHub release | |
| issues: write # comment on released issues | |
| pull-requests: write # comment on released pull requests | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "lts/*" | |
| - name: semantic-release | |
| run: npx semantic-release@24 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |