Skip to content

Commit

Permalink
CI: fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nickadamson committed Dec 11, 2023
1 parent 15361dd commit 7e46448
Show file tree
Hide file tree
Showing 4 changed files with 403 additions and 220 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ jobs:
with:
submodules: true

- name: Setup .npmrc for pulling/publishing from/to github packages
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
scope: '@valorem-labs-inc'

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
Expand All @@ -37,28 +44,19 @@ jobs:
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: pnpm audit signatures

- name: Setup .npmrc file to publish to npm
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
scope: '@valorem-labs-inc'

- name: Publish
- name: Publish to Github Packages
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GHP_PAT: ${{ secrets.GHP_PAT }}
run: pnpm ci:release

- name: Setup .npmrc for publishing to github packages
- name: Setup .npmrc file to publish to npm
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
registry-url: 'https://registry.npmjs.org'
scope: '@valorem-labs-inc'

# Runs changeset version to see if pkg v needs bumped
# () || true prevents exit code 1 when there is no v bump needed
- name: Publish to Github Packages
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm ci:release
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ dedupe-peer-dependents=true
shared-workspace-lockfile=false
prefer-workspace-packages=true

//npm.pkg.github.com/:_authToken=${CR_PAT}
//npm.pkg.github.com/:_authToken=${GHP_PAT}
@valorem-labs-inc:registry=https://npm.pkg.github.com
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
"@types/react": "^18.2.31",
"@types/react-dom": "^18.2.14",
"@vercel/style-guide": "^5.0.1",
"@vitest/coverage-v8": "^0.34.6",
"@vitest/coverage-v8": "^1.0.4",
"@wagmi/cli": "^1.5.2",
"@wagmi/core": "^1.4.7",
"@wagmi/core": "1.4.7",
"abitype": "0.8.7",
"connectkit": "^1.5.3",
"eslint": "^8.52.0",
Expand All @@ -52,7 +52,7 @@
"siwe": "^2.1.4",
"typedoc": "^0.25.2",
"typedoc-plugin-missing-exports": "^2.1.0",
"vitest": "^0.34.6"
"vitest": "^1.0.4"
},
"peerDependencies": {
"@bufbuild/buf": "^1.27.1",
Expand All @@ -62,7 +62,7 @@
"@connectrpc/connect-web": "^1.1.2",
"@tanstack/react-query": "^4.36.1",
"@valorem-labs-inc/sdk": "^0.0.4",
"@wagmi/core": "^1.4.7",
"@wagmi/core": "1.4.7",
"abitype": "0.8.7",
"connectkit": "^1.5.3",
"react": "17.x || 18.x",
Expand Down
Loading

0 comments on commit 7e46448

Please sign in to comment.