-
Notifications
You must be signed in to change notification settings - Fork 963
35 lines (33 loc) · 1.08 KB
/
publish-npm-beta.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
name: Publish NPM Beta
on: workflow_dispatch
jobs:
deploy-npm-beta:
runs-on: macos-12
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: 18.x
- name: NPM ^9.5.0
run: npm i -g npm@^9.5.0 --registry=https://registry.npmjs.org
- name: Restore Dependency Cache
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.OS }}-dependencies-cache-${{ hashFiles('**/package.json') }}
- run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
npm whoami
npm install
- name: Version & Publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
run: |
git config user.name "Github Workflow (on behalf of ${{ github.actor }})"
git config user.email "users.noreply.github.com"
npm run ci:publish:beta