-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.46 KB
/
release.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
46
47
48
49
50
name: Release
on:
workflow_dispatch:
# push:
# branches:
# - main
env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store
jobs:
release:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install pnpm
run: npm i pnpm@8 -g
- name: Setup pnpm cache directory
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Publish packages
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
working-directory: .
run: |
npm config set //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
CWD=`pwd`
cd $CWD/eslint/eslint-config-base && npm ${{ env.PUBLISH_COMMAND }}
cd $CWD/eslint/eslint-config-node && npm ${{ env.PUBLISH_COMMAND }}
cd $CWD/eslint/eslint-config-prettier && npm ${{ env.PUBLISH_COMMAND }}
cd $CWD/eslint/eslint-config-typescript && npm ${{ env.PUBLISH_COMMAND }}
cd $CWD/prettier/prettier-config && npm ${{ env.PUBLISH_COMMAND }}
cd $CWD
env:
PUBLISH_COMMAND: ${{ contains(github.ref, 'beta') && 'publish --tag beta' || 'publish' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}