Skip to content

Commit 3421e98

Browse files
test oidc auth by forcing empty credentials
1 parent 1e65e20 commit 3421e98

3 files changed

Lines changed: 161 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ jobs:
105105
title: Version Packages - ${{ github.ref_name }}
106106
publish: pnpm release latest
107107
env:
108+
NODE_AUTH_TOKEN: ''
108109
NPM_TOKEN: ''
109110
NPM_CONFIG_PROVENANCE: true
110111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -133,5 +134,6 @@ jobs:
133134
env:
134135
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
135136
NPM_TOKEN: ''
137+
NODE_AUTH_TOKEN: ''
136138
NPM_CONFIG_PROVENANCE: true
137139
SHOPIFY_CLI_BUILD_REPO: ${{ github.repository }}
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Test OIDC Authentication
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
id-token: write
9+
10+
env:
11+
PNPM_VERSION: '10.11.1'
12+
13+
jobs:
14+
test-oidc-setup:
15+
name: Test OIDC Setup
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup deps
23+
uses: ./.github/actions/setup-cli-deps
24+
with:
25+
node-version: 24.12.0
26+
27+
- name: Check npm version
28+
run: npm --version
29+
30+
- name: Check Node version
31+
run: node --version
32+
33+
- name: Verify .npmrc configuration
34+
run: |
35+
echo "=== Checking .npmrc files exist ==="
36+
if [ -f ~/.npmrc ]; then
37+
echo "✅ ~/.npmrc exists"
38+
if grep -q "registry.npmjs.org" ~/.npmrc; then
39+
echo "✅ Contains npm registry configuration"
40+
fi
41+
else
42+
echo "ℹ️ No .npmrc in home directory"
43+
fi
44+
45+
if [ -f .npmrc ]; then
46+
echo "✅ ./.npmrc exists in project"
47+
else
48+
echo "ℹ️ No .npmrc in project directory"
49+
fi
50+
51+
- name: Verify environment configuration
52+
run: |
53+
if [ -z "${NODE_AUTH_TOKEN+x}" ]; then
54+
echo "❌ NODE_AUTH_TOKEN not set"
55+
else
56+
echo "✅ NODE_AUTH_TOKEN is configured"
57+
fi
58+
59+
if [ "${NPM_CONFIG_PROVENANCE}" = "true" ]; then
60+
echo "✅ NPM_CONFIG_PROVENANCE is enabled"
61+
else
62+
echo "❌ NPM_CONFIG_PROVENANCE not enabled"
63+
fi
64+
env:
65+
NODE_AUTH_TOKEN: ''
66+
NPM_TOKEN: ''
67+
NPM_CONFIG_PROVENANCE: true
68+
69+
- name: Test npm publish dry-run
70+
run: |
71+
cd packages/cli-kit
72+
npm publish --dry-run --provenance --access public 2>&1 | grep -E "(Publishing|provenance|notice|Published)" || true
73+
env:
74+
NODE_AUTH_TOKEN: ''
75+
NPM_TOKEN: ''
76+
NPM_CONFIG_PROVENANCE: true
77+
78+
- name: Check OIDC token availability
79+
run: |
80+
if [ -n "${ACTIONS_ID_TOKEN_REQUEST_URL+x}" ]; then
81+
echo "✅ OIDC token request URL is available"
82+
else
83+
echo "❌ OIDC token request URL is NOT available"
84+
fi

packages/cli-kit/README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<img src="https://github.com/Shopify/cli/blob/main/assets/logo.png?raw=true" width="150"/>
2+
3+
# Shopify CLI
4+
<a href="http://twitter.com/ShopifyDevs"><img src="https://img.shields.io/twitter/follow/ShopifyDevs?style=flat-square" alt="Twitter Followers"></a>
5+
<img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License">
6+
<a href="https://github.com/Shopify/cli/actions/workflows/shopify-cli.yml">![badge](https://github.com/Shopify/cli/actions/workflows/shopify-cli.yml/badge.svg)</a>
7+
8+
With the Shopify command line interface (Shopify CLI 3.0), you can:
9+
- initialize, build, dev, and deploy Shopify apps, extensions, functions and themes
10+
- build custom storefronts and manage their hosting
11+
12+
Learn more in the [commands docs](./packages/cli/README.md#commands).
13+
14+
<p>&nbsp;</p>
15+
16+
## Before you begin
17+
18+
Install the latest version of [Node.js](https://nodejs.org/en/download/) and [npm](https://docs.npmjs.com/getting-started) (or another package manager of your choice).
19+
20+
<p>&nbsp;</p>
21+
22+
## Developing apps with Shopify CLI
23+
24+
When you’re building a Shopify app, you can initialize your project using your preferred package manager. A single command will install all the dependencies you need — including Shopify CLI itself.
25+
26+
Initialize your project using one of the following commands:
27+
- `npm init @shopify/app@latest` (installed by default with Node)
28+
- `pnpm create @shopify/create-app@latest`
29+
- `yarn create @shopify/app`
30+
- `bun create @shopify/app@latest` (experimental)
31+
32+
Learn more in the docs: [Create an app](https://shopify.dev/apps/getting-started/create)
33+
34+
<p>&nbsp;</p>
35+
36+
## Developing themes with Shopify CLI
37+
38+
To work with themes, the CLI needs to be installed globally with:
39+
40+
- `npm install -g @shopify/cli @shopify/theme`
41+
42+
You can also use do it through Homebrew on macOS: `brew tap shopify/shopify && brew install shopify-cli`
43+
44+
Learn more in the docs: [Shopify CLI for themes](https://shopify.dev/docs/storefronts/themes/tools/cli)
45+
46+
<p>&nbsp;</p>
47+
48+
## Developing Hydrogen custom storefronts with Shopify CLI ##
49+
50+
The Hydrogen code lives here: https://github.com/Shopify/hydrogen/tree/main/packages/cli
51+
52+
Learn more in the docs: [Shopify CLI for Hydrogen storefronts](https://shopify.dev/docs/custom-storefronts/hydrogen/cli)
53+
54+
<p>&nbsp;</p>
55+
56+
## Help 🖐
57+
58+
If you encounter issues using the CLI or have feedback you'd like to share with us, below are some options:
59+
60+
- [File a bug report](https://community.shopify.dev/c/shopify-cli-libraries/14) - To report bugs create a post in Shopify CLI and Libraries on the dev community
61+
- [Ask a question or request a new feature](https://community.shopify.dev/c/dev-platform/32) - To ask a question or request a new feature create a post in Dev Platform on the dev community
62+
- [Shopify Community Forums](https://community.shopify.com/) - Visit our forums to connect with the community and learn more about Shopify CLI development
63+
- [CLI Documentation - Apps](https://shopify.dev/apps/tools/cli) - To view CLI documentation for app development
64+
- [CLI Documentation - Themes](https://shopify.dev/themes/tools/cli) - To view CLI documentation for theme development
65+
- [CLI Documentation - Hydrogen](https://shopify.dev/custom-storefronts/tools/cli) - To view CLI documentation for Hydrogen (custom storefront) development
66+
67+
## Contribute 👩🏽‍💻
68+
69+
If you'd like to contribute to the project, check out the [contributors docs](/docs) and the [steps to get started](/docs/cli/get-started.md).
70+
71+
<p>&nbsp;</p>
72+
73+
## References
74+
75+
- [oclif](https://oclif.io/)

0 commit comments

Comments
 (0)