0.2.1 #19
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: Publish to npm | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # リポジトリをチェックアウト(フル履歴) | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # Node.js 22 をセットアップ | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22 | |
| registry-url: https://registry.npmjs.org | |
| # pnpm をグローバルインストール | |
| - name: Install pnpm | |
| run: npm install -g [email protected] | |
| # npm 認証トークンを設定 | |
| - name: Configure npm auth | |
| run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| # 依存関係をインストール | |
| - name: Install dependencies | |
| run: pnpm install | |
| # ビルド | |
| - name: Build | |
| run: pnpm build | |
| # npm に公開(Git チェックをスキップ) | |
| - name: Publish to npm | |
| run: pnpm publish --access public --no-git-checks | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |