-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
72 lines (67 loc) · 2.15 KB
/
refine-registry-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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Refine Registry Release
on:
push:
paths:
- ".changeset/**"
- "packages/**"
branches:
- next
env:
RELEASE_ONLY: ${{ secrets.RELEASE_ONLY }}
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PANKOD_BOT_TOKEN }}
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "pnpm"
- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
@refinedev:registry=https://registry.refine.dev
//registry.refine.dev/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.REFINE_REGISTRY_TOKEN }}
- name: Install Dependencies & Build
run: pnpm install
- name: Lint
run: pnpm lint:ci
if: ${{ env.RELEASE_ONLY != 'YES' }}
- name: Syncpack
run: pnpm sp lint
if: ${{ env.RELEASE_ONLY != 'YES' }}
- name: Publint
run: pnpm publint:all
if: ${{ env.RELEASE_ONLY != 'YES' }}
- name: Are The Types Wrong
run: pnpm attw:all
if: ${{ env.RELEASE_ONLY != 'YES' }}
- name: Test
run: pnpm test:all
if: ${{ env.RELEASE_ONLY != 'YES' }}
- name: Copy changesets for Community version
run: mkdir -p ./_changeset/ && cp -r ./.changeset/* ./_changeset/
- name: Convert major and minor changesets to patch
run: node ./.github/workflows/scripts/convert-to-patch.js
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
version: pnpm version-packages
publish: pnpm changeset publish --tag next
commit: "ci(changesets): refine registry version packages"
title: "ci(changesets): refine registry version packages"
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.PANKOD_BOT_TOKEN }}
NPM_TOKEN: ${{ secrets.REFINE_REGISTRY_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.REFINE_REGISTRY_TOKEN}}