Skip to content

Commit

Permalink
Merge pull request #34 from Uniswap/chore/use-npm-runner-token
Browse files Browse the repository at this point in the history
chore(infra): set up npm runner token
  • Loading branch information
mr-uniswap authored Jul 4, 2024
2 parents 0ea886c + 234c463 commit 61c6090
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
runs-on:
group: npm-deploy
environment:
name: release
steps:
Expand All @@ -18,6 +19,18 @@ jobs:
with:
node-version: "12"

- name: Load secret
uses: 1password/load-secrets-action@581a835fb51b8e7ec56b71cf2ffddd7e68bb25e0
with:
# Export loaded secrets as environment variables
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
# You may need to change this to your vault name and secret name
# Refer to it by calling env.NPM_TOKEN
# This token is also limited by IP to ONLY work on the runner
NPM_TOKEN: op://npm-deploy/npm-runner-token/secret

- name: Install dependencies
run: yarn install --frozen-lockfile

Expand All @@ -30,7 +43,7 @@ jobs:
- name: Publish to NPM
uses: JS-DevTools/npm-publish@18351461ae08dde235c0ccee0633ec905f0b9a52
with:
token: ${{ secrets.NPM_TOKEN }}
token: ${{ env.NPM_TOKEN }}

- name: Pin to IPFS
id: upload
Expand Down

0 comments on commit 61c6090

Please sign in to comment.