chore(release): publish #36
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 | |
| on: | |
| push: | |
| tags: | |
| - "v-release" | |
| concurrency: | |
| group: publish | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| with: | |
| fetch-depth: 0 | |
| # Node 26 以降は corepack が同梱されないため、先に明示的にインストールする | |
| - name: Install Corepack | |
| run: npm install -g corepack | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 26 | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Build | |
| run: yarn build | |
| - name: Determine dist-tag | |
| id: dist-tag | |
| run: | | |
| VERSION=$(node -e "console.log(require('./packages/@d-zero/shared/package.json').version)") | |
| if [[ "$VERSION" == *"-alpha"* ]]; then | |
| echo "tag=alpha" >> "$GITHUB_OUTPUT" | |
| elif [[ "$VERSION" == *"-beta"* ]]; then | |
| echo "tag=beta" >> "$GITHUB_OUTPUT" | |
| elif [[ "$VERSION" == *"-rc"* ]]; then | |
| echo "tag=rc" >> "$GITHUB_OUTPUT" | |
| elif [[ "$VERSION" == *"-"* ]]; then | |
| echo "tag=next" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "tag=latest" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Publish | |
| run: npx lerna publish from-package --dist-tag ${{ steps.dist-tag.outputs.tag }} --yes | |
| - name: Publish (retry on transient sigstore 409) | |
| if: failure() | |
| run: npx lerna publish from-package --dist-tag ${{ steps.dist-tag.outputs.tag }} --yes |