-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.6 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
51
52
53
54
55
56
57
58
name: Release
# Controls when the action will run.
on:
# Triggers the workflow on publish/prerelease tag
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
fetch-depth: 0
# Runs a single command using the runners shell
- name: Use node.js
uses: actions/setup-node@v3
with:
node-version: "20.15.0"
- name: Config git user
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
# Runs a set of commands using the runners shell
- name: Install packages
run: |
yarn
- name: Build packages
run: |
yarn dist
# Runs a set of commands using the runners shell
- name: Publish release
run: |
echo "@react-fabric:registry=https://registry.npmjs.org/" > .npmrc
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
npm whoami
lerna publish from-package --yes --no-verify-access
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Rebase development branch
run: |
git checkout dev
git fetch
git pull
git rebase origin/main -q
git push -ff