Skip to content

Commit ded772e

Browse files
committed
Merge pull request #34 from Shopify/setup-release-yml-odic
Setup release.yml with ODIC
2 parents ae6741b + 0f2001a commit ded772e

2 files changed

Lines changed: 20 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,26 @@ jobs:
3434
node-version-file: package.json
3535
pnpm-version: 10.28.0
3636
- run: pnpm install --frozen-lockfile
37+
- name: Configure public npm registry
38+
shell: bash
39+
env:
40+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
run: |
42+
set -euo pipefail
43+
userconfig="$RUNNER_TEMP/npm-public.npmrc"
44+
{
45+
echo '@shopify:registry=https://registry.npmjs.org/'
46+
echo 'registry=https://registry.npmjs.org/'
47+
if [[ -n "${NPM_TOKEN:-}" ]]; then
48+
printf '//registry.npmjs.org/:_authToken=%s\n'
49+
fi
50+
} > "$userconfig"
51+
echo "NPM_CONFIG_USERCONFIG=$userconfig" >> "$GITHUB_ENV"
3752
- uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b # v1.8.0
3853
with:
3954
version: pnpm version-packages
4055
publish: pnpm release
4156
env:
4257
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4358
# NPM_CONFIG_PROVENANCE: "true"
44-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
59+
NPM_TOKEN: ''

.npmrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# minimum-release-age=10080
2-
# package-manager-strict=true
3-
# auto-install-peers=true
4-
# strict-peer-dependencies=false
1+
minimum-release-age=10080
2+
package-manager-strict=true
3+
auto-install-peers=true
4+
strict-peer-dependencies=false

0 commit comments

Comments
 (0)