LatestRelease #6
Workflow file for this run
This file contains 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: LatestRelease | |
on: | |
# Run a workflow when a release has been released | |
# @see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release | |
release: | |
types: [released] | |
jobs: | |
release-utils: | |
name: "Latest release @itsumono/utils" | |
# Do not run if the release is a prerelease or draft | |
# @see https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#release | |
if: ${{ startsWith(github.event.release.tag_name, 'utils@') && github.event.release.prerelease == false && github.event.release.draft == false }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".node-version" | |
cache: "pnpm" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile --reporter=silent | |
# Build and Deploy | |
- name: building | |
run: npm run build -w @itsumono/utils | |
- name: publish | |
# --no-git-checks is set because of the following issues: | |
# https://github.com/pnpm/pnpm/issues/5894 | |
# https://github.com/pnpm/pnpm/issues/2995 | |
run: pnpm publish --no-git-checks --filter=@itsumono/utils | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
release-react: | |
name: "Latest release @itsumono/react" | |
# Do not run if the release is a prerelease or draft | |
# @see https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#release | |
if: ${{ startsWith(github.event.release.tag_name, 'react@') && github.event.release.prerelease == false && github.event.release.draft == false }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".node-version" | |
cache: "pnpm" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile --reporter=silent | |
# Build and Deploy | |
- name: building | |
run: npm run build -w @itsumono/react | |
- name: publish | |
# --no-git-checks is set because of the following issues: | |
# https://github.com/pnpm/pnpm/issues/5894 | |
# https://github.com/pnpm/pnpm/issues/2995 | |
run: pnpm publish --no-git-checks --filter=@itsumono/react | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |