Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Node setup and Install Dependencies

inputs:
npm-token:
required: true

runs:
using: "composite"
steps:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
always-auth: true

- name: Setup npm authentication
run: echo "//registry.npmjs.org/:_authToken=${{ inputs.npm-token }}" > ~/.npmrc
shell: bash

- name: Install dependencies
run: npm ci
shell: bash
14 changes: 3 additions & 11 deletions .github/workflows/publish-beta-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
- name: Setup Node, auth, and install deps
uses: ./.github/actions/install
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
always-auth: true

- name: Setup npm authentication
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_CHAINLINK_LOCAL }}" > ~/.npmrc

- name: Install dependencies
run: npm ci
npm-token: ${{ secrets.NPM_CHAINLINK_LOCAL }}

- name: Publish
run: npm publish --tag beta
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
- name: Setup Node, auth, and install deps
uses: ./.github/actions/install
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
always-auth: true

- name: Setup npm authentication
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_CHAINLINK_LOCAL }}" > ~/.npmrc

- name: Install dependencies
run: npm ci
npm-token: ${{ secrets.NPM_CHAINLINK_LOCAL }}

- name: Publish
run: npm publish
Expand Down