diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 79547ac..c144fe7 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -6,7 +6,8 @@ on: jobs: deploy: name: Deploy - runs-on: ubuntu-latest + runs-on: + group: npm-deploy environment: name: release steps: @@ -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 @@ -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