-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.35 KB
/
publish-eslint-config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Publish "eslint-config" to npmjs
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
environment:
name: production
env:
# Remote Caching 機能を利用するための環境変数
# @see https://turbo.build/repo/docs/ci/github-actions
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- uses: actions/checkout@v3
# node_modules がキャッシュされていれば展開する
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
# node_modules がキャッシュされてなければ npm ci
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: node
uses: actions/setup-node@v3
with:
node-version: '16'
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: npm install
run: npm ci
- name: Publish "eslint-config"
run: npm publish -w @unwheel-pkg/eslint-config
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}