Skip to content

Commit 9bee06a

Browse files
committed
publish workflowを追加
1 parent 0af9d2b commit 9bee06a

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

.github/actions/setup/action.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Setup
2+
description: Setup project
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Setup pnpm
8+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
9+
10+
- name: Setup Node.js
11+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
12+
with:
13+
cache: pnpm
14+
node-version-file: .node-version
15+
16+
- name: Install dependencies
17+
shell: bash
18+
run: |
19+
pnpm install --frozen-lockfile --prefer-offline
20+
pnpm store prune

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
name: Publish
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Setup
22+
uses: ./.github/actions/setup
23+
24+
- name: Create release pull request or publish to npm
25+
uses: changesets/action@c8bada60c408975afd1a20b3db81d6eee6789308 # v1.4.9
26+
with:
27+
publish: pnpm run version:publish
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)