Skip to content

Commit ee80435

Browse files
author
Craigory Coppola
committed
feat(repo): Update build script to utilize Nx's capabilities regarding package.json patching.
Signed-off-by: Craigory Coppola <craigory.coppola@universalplant.com>
1 parent 80b9779 commit ee80435

File tree

9 files changed

+52
-28545
lines changed

9 files changed

+52
-28545
lines changed

.github/workflows/main.yml

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ jobs:
3838
- uses: actions/checkout@v1
3939
- uses: bahmutov/npm-install@v1.4.5
4040
- run: yarn nx affected -- --target=build --base=origin/master~1 --parallel --with-deps
41-
- name: Archive production artifacts
42-
uses: actions/upload-artifact@v2
43-
with:
44-
name: dist
45-
path: |
46-
dist
4741

4842
test:
4943
runs-on: ubuntu-latest
@@ -64,18 +58,44 @@ jobs:
6458
- uses: actions/checkout@v1
6559
- uses: bahmutov/npm-install@v1.4.5
6660
- run: yarn nx affected -- --target=lint --base=origin/master~1 --parallel
67-
68-
e2e:
61+
62+
publish-dev:
6963
runs-on: ubuntu-latest
70-
name: E2E testing affected apps
71-
needs: [pre-run, build]
72-
if: needs.pre-run.outputs.skip == 'false'
64+
name: Publish packages to dev
65+
needs: [pre-run]
66+
if: ${{needs.pre-run.outputs.skip == 'false' && github.ref == 'refs/heads/master' && github.event_name == 'push'}}
7367
steps:
7468
- uses: actions/checkout@v1
69+
- uses: actions/setup-node@v1
70+
with:
71+
registry-url: 'https://registry.npmjs.org'
72+
always-auth: true,
73+
node-version: 14
7574
- uses: bahmutov/npm-install@v1.4.5
76-
- name: Download a single artifact
77-
uses: actions/download-artifact@v2
75+
- name: Git Config
76+
run: |
77+
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
78+
git config --local user.name "github-actions[bot]"
79+
- run: yarn ts-node tools/scripts/publish-dev
80+
env:
81+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
82+
- name: Push changes
83+
uses: ad-m/github-push-action@master
7884
with:
79-
name: dist
80-
path: dist
81-
- run: yarn e2e
85+
github_token: ${{ secrets.GITHUB_TOKEN }}
86+
branch: ${{ github.ref }}
87+
tags: true
88+
# e2e:
89+
# runs-on: ubuntu-latest
90+
# name: E2E testing affected apps
91+
# needs: [pre-run, build]
92+
# if: needs.pre-run.outputs.skip == 'false'
93+
# steps:
94+
# - uses: actions/checkout@v1
95+
# - uses: bahmutov/npm-install@v1.4.5
96+
# - name: Download a single artifact
97+
# uses: actions/download-artifact@v2
98+
# with:
99+
# name: dist
100+
# path: dist
101+
# - run: yarn e2e

0 commit comments

Comments
 (0)