forked from facebook/create-react-app
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ARGG-784]: Release pipeline for cra5 testing (#168)
* [ARGG-784]: Release pipeline for cra5 testing * [ARGG-784]: Remove artifactory references in lockfile * Prettier the files * Eslint fixes
- Loading branch information
1 parent
e47dc6b
commit 5464f3f
Showing
21 changed files
with
269 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: fork_cra5-release | ||
|
||
on: | ||
push: | ||
branches: [fork_cra5] | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
env: | ||
CACHE_NAME: node-modules-cache | ||
BUILD_CACHE_NAME: build-cache | ||
|
||
jobs: | ||
Create-NPM-Cache: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Upload to Cache | ||
uses: actions/cache@v3.3.2 | ||
id: npm-cache | ||
with: | ||
path: node_modules/ | ||
key: ${{ env.CACHE_NAME }}-${{ hashFiles('packages/**') }} | ||
|
||
- name: Install dependencies | ||
if: ${{ steps.npm-cache.outputs.cache-hit != 'true' }} | ||
run: npm ci | ||
|
||
TestBuild: | ||
runs-on: ubuntu-latest | ||
needs: [Create-NPM-Cache] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Restore Cache | ||
uses: actions/cache/restore@v3.3.2 | ||
id: npm-cache | ||
with: | ||
path: node_modules/ | ||
key: ${{ env.CACHE_NAME }}-${{ hashFiles('packages/**') }} | ||
|
||
- name: Run e2e | ||
run: tasks/e2e-brs.sh | ||
|
||
ReleaseWeb: | ||
name: Release dev version to NPM | ||
runs-on: ubuntu-latest | ||
environment: Publishing | ||
needs: [Create-NPM-Cache, TestBuild] | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: fork_cra5 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Restore Cache | ||
uses: actions/cache/restore@v3.3.2 | ||
id: npm-cache | ||
with: | ||
path: node_modules/ | ||
key: ${{ env.CACHE_NAME }}-${{ hashFiles('packages/**') }} | ||
|
||
- name: Build react-error-overlay | ||
run: | | ||
cd packages/react-error-overlay/ | ||
npm run build:prod | ||
- name: Publish NPM package | ||
run: | | ||
cd packages/react-scripts | ||
npm version prerelease --preid=dev --no-git-tag-version | ||
npm publish --tag alpha | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
Oops, something went wrong.