forked from facebook/create-react-app
-
Notifications
You must be signed in to change notification settings - Fork 31
46 lines (38 loc) · 1.01 KB
/
main.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
name: main-release
on:
push:
branches: [main]
defaults:
run:
shell: bash -l {0}
jobs:
ReleaseWeb:
name: Release dev version to NPM
runs-on: ubuntu-latest
environment: Publishing
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
ref: main
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: 'https://registry.npmjs.org'
- name: Install
run: npm ci --prefer-offline
- name: Build react-error-overlay
run: |
cd packages/react-error-overlay/
npm run build:prod
- name: Build
run: npm run build
- name: Publish NPM package
run: |
cd packages/react-scripts
npm version prerelease --preid=$BUILD_VERSION-dev --no-git-tag-version
npm publish --tag alpha
env:
BUILD_VERSION: ${{ github.run_number }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}