Skip to content

Commit e332ef3

Browse files
committed
ci: add GitHub Actions workflow "publish npm package function-types"
1 parent 8b3d4d7 commit e332ef3

2 files changed

Lines changed: 59 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Lint GitHub Actions workflows
2+
on:
3+
pull_request:
4+
5+
permissions:
6+
contents: read
7+
8+
defaults:
9+
run:
10+
shell: bash
11+
12+
jobs:
13+
actionlint:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17+
18+
- name: Set up actionlint
19+
id: setup_actionlint
20+
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
21+
22+
- name: Lint
23+
run: ${{ steps.setup_actionlint.outputs.executable }} -color
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish npm package function-types
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
jobs:
14+
publish:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19+
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
20+
with:
21+
node-version-file: packages/types/package.json
22+
registry-url: https://registry.npmjs.org
23+
24+
- name: Update npm and corepack
25+
run: |
26+
npm i -g npm
27+
npm i -g corepack@latest
28+
29+
- name: Publish
30+
working-directory: packages/types
31+
run: |
32+
corepack enable
33+
pnpm install
34+
pnpm publish --no-git-checks --access public
35+
env:
36+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

0 commit comments

Comments
 (0)