v0.0.8 #7
Workflow file for this run
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: Publication π¦ | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| environment: npm | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.release.tag_name }} | |
| - name: Verify tag matches package.json | |
| run: | | |
| TAG_NAME="${{ github.event.release.tag_name }}" | |
| TAG_VERSION="${TAG_NAME#v}" | |
| PKG_VERSION=$(jq -r .version package.json) | |
| if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then | |
| echo "Error: νκ·Έ λ²μ κ³Ό package.json λ²μ μ΄ μΌμΉνμ§ μμ΅λλ€." | |
| echo "tag version: ${TAG_VERSION}" | |
| echo "package.json version: ${PKG_VERSION}" | |
| exit 1 | |
| fi | |
| echo "β λ²μ μΌμΉ νμΈ: ${TAG_VERSION}" | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Build package | |
| run: | | |
| bun install --frozen-lockfile | |
| bun run prepare | |
| bun run build:lib | |
| - name: Publish to npm | |
| run: npm publish --provenance --ignore-scripts # --provenance: OIDC μΈμ¦ λ° μΆμ² μ¦λͺ , --ignore-scripts: skip prepare script (already ran in Build package step) |