Skip to content

Commit

Permalink
chore: change env name npm (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizAsFight authored Jan 23, 2025
1 parent 0268e0f commit 2a3947c
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 23 deletions.
20 changes: 8 additions & 12 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
List the issues this PR closes in a bullet list format, e.g.:
- Closes #X
- Closes `FE-Z`
- Closes FE-Z
-->

# Summary
Expand All @@ -12,14 +12,10 @@ Many times this section is not needed as the closed issues themselves explains t

# Checklist

- [ ] I've added error handling for all actions/requests, and verified how this error will show on UI.
- [ ] I've reviewed all the copies changed/added in this PR (use AI if needs help)
- [ ] I've included the reference to the issues being closed (Github and/or Linear)
- [ ] I've changed the Docs to reflect my changes (project setup, run commands, etc…)
- [ ] I've put docs links where it may be helpful.
- [ ]
- [ ] I've added error handling for all actions/requests, and verified how it will show on UI (or verifying error handling was needed)
- [ ] I've reviewed all the copies changed/added in this PR, using AI if needed (or no copy changes were made)
- [ ] I've included the reference to the Github and/or Linear issues being closed (or no issues to reference)
- [ ] I've changed the Docs to reflect my changes (or no doc updates were needed)
- [ ] I've put docs links where it may be helpful (or no doc links were needed)
- [ ] I've added error handling for all actions/requests, and verified how this error will show on UI. (or there was no error handling)
- [ ] I've reviewed all the copy changed/added in this PR, using AI if needed. (or there was no copy changes)
- [ ] I've included the reference to the issues being closed from Github and/or Linear (or there was no issues)
- [ ] I've changed the Docs to reflect my changes (or it was not needed)
- [ ] I've put docs links where it may be helpful (or it was not needed)
- [ ] I checked the resulting UI both in Light and Dark mode (or no UI changes were made)
- [ ] I **reviewed** the **entire PR** myself (preferably, on GH UI)
9 changes: 5 additions & 4 deletions .github/workflows/pr-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: 'Release PR to npm'
runs-on: buildjet-4vcpu-ubuntu-2204
# Comment if:false to enable release PR to npm
if: false
# if: false
permissions: write-all
steps:
- uses: actions/checkout@v3
Expand All @@ -23,10 +23,11 @@ jobs:
pnpm-version: 9.5.0
- uses: FuelLabs/github-actions/setups/npm@master
with:
npm-token: ${{ secrets.NPM_TOKEN }}
npm-token: ${{ secrets.NPM_TOKEN_CONNECTORS }}

- name: Build
run: pnpm build
env:
NEXT_PUBLIC_PROVIDER_URL: "http://localhost:4000/v1/graphql"
NEXT_PUBLIC_WC_PROJECT_ID: e01471314fc69cc4efba6dce12dfd710
NEXT_PUBLIC_CHAIN_ID_NAME: testnet
Expand All @@ -41,7 +42,7 @@ jobs:
published_version=$(echo "$changetsets" | grep -oP '@\K([0-9]+\.){2}[0-9]+-pr-${{ env.PR_NUMBER }}-\d+' | head -1)
echo "published_version=$published_version" >> $GITHUB_OUTPUT
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_CONNECTORS }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}

Expand All @@ -50,4 +51,4 @@ jobs:
message: |
This PR is published in NPM with version **${{ steps.release.outputs.published_version }}**
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\
2 changes: 1 addition & 1 deletion .github/workflows/release-npm-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
pnpm-version: 9.5.0
- uses: FuelLabs/github-actions/setups/npm@master
with:
npm-token: ${{ secrets.NPM_TOKEN }}
npm-token: ${{ secrets.NPM_TOKEN_CONNECTORS }}

- name: Collect current version
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-npm-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
pnpm-version: 9.5.0
- uses: FuelLabs/github-actions/setups/npm@master
with:
npm-token: ${{ secrets.NPM_TOKEN }}
npm-token: ${{ secrets.NPM_TOKEN_CONNECTORS }}

- name: Build Lib
run: pnpm build
Expand All @@ -42,7 +42,7 @@ jobs:
changetsets=$(pnpm changeset publish --tag preview)
echo "BUILD_VERSION=$(pnpm -s packages:version)" >> $GITHUB_ENV
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_CONNECTORS }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Comment release package name to PR
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-npm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
pnpm-version: 9.5.0
- uses: FuelLabs/github-actions/setups/npm@master
with:
npm-token: ${{ secrets.NPM_TOKEN }}
npm-token: ${{ secrets.NPM_TOKEN_CONNECTORS }}

- name: Bump and Collect Version
run: |
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
githubTagName: v${{ env.BUILD_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN_CONNECTORS }}

- name: Release to @main tag
if: steps.changesets.outputs.published != 'true'
Expand All @@ -66,5 +66,5 @@ jobs:
pnpm changeset version --snapshot main
pnpm changeset publish --tag main
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN_CONNECTORS }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/unpublish-npm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
pnpm-version: 9.5.0
- uses: FuelLabs/github-actions/setups/npm@master
with:
npm-token: ${{ secrets.NPM_TOKEN }}
npm-token: ${{ secrets.NPM_TOKEN_CONNECTORS }}
- run: |
node ./scripts/unpublish.js
env:
Expand Down

0 comments on commit 2a3947c

Please sign in to comment.