Skip to content

Commit 072f3b2

Browse files
authored
Fix NPM deploy (#5)
1 parent c8365e4 commit 072f3b2

File tree

3 files changed

+56
-19
lines changed

3 files changed

+56
-19
lines changed

.github/workflows/canary-release.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/pr.yaml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
1-
name: NPM PR
1+
name: PR
22

33
on:
4-
pull_request
4+
pull_request:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
8+
cancel-in-progress: true
59

610
jobs:
7-
pr:
8-
uses: jupiterone/github-internal/.github/workflows/npm-pr.yaml@v1
9-
secrets: inherit
11+
validate:
12+
name: Validate
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Install Dependencies
17+
run: npm ci --no-scripts
18+
env:
19+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
20+
21+
- name: Install Rebuild
22+
run: npm rebuild
23+
24+
- name: Run Validation
25+
run: npm run validate:ci
26+
27+
- name: Run Build
28+
run: npm run build

.github/workflows/release.yaml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,35 @@ on:
66
- main
77

88
jobs:
9-
release:
10-
uses: jupiterone/github-internal/.github/workflows/npm-release.yaml@v1
11-
secrets: inherit
9+
validate:
10+
name: Validate
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 2
16+
- name: Authenticate with private NPM package
17+
run: echo "//registry.npmjs.org/:_authToken=\$NPM_AUTH_TOKEN" > ~/.npmrc
18+
19+
- name: Install Dependencies
20+
run: npm ci --no-scripts
21+
env:
22+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
23+
24+
- name: Install Rebuild
25+
run: npm rebuild
26+
27+
- name: Run Validation
28+
run: npm run validate
29+
30+
- name: Run Build
31+
run: npm run build
32+
33+
- run: |
34+
git config --global user.email "[email protected]"
35+
git config --global user.name "Automation"
36+
npx --yes -p auto@11 auto shipit --plugins npm released
37+
env:
38+
GH_TOKEN: ${{ secrets.AUTO_GITHUB_PAT_TOKEN }}
39+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
40+
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 commit comments

Comments
 (0)