|
1 | 1 | name: Deploy |
2 | 2 |
|
3 | 3 | on: |
4 | | - workflow_dispatch: # temporary for manual deployment |
5 | 4 | push: |
6 | 5 | branches: |
7 | 6 | # Stable version branches |
@@ -46,35 +45,13 @@ jobs: |
46 | 45 | NPM_TOKEN: '' # Forces OIDC authentication |
47 | 46 | GITHUB_TOKEN: ${{ secrets.SHOPIFY_GH_ACCESS_TOKEN }} |
48 | 47 |
|
49 | | - - name: Temporary manual sync 'latest' tag # will be removed after sync |
50 | | - if: github.event_name == 'workflow_dispatch' && github.ref_name == vars.LATEST_STABLE_VERSION |
51 | | - env: |
52 | | - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
53 | | - run: | |
54 | | - # dist-tag does not support OIDC yet, so fallback to classic token |
55 | | - # overwrite the .npmrc to ensure no OIDC session conflicts |
56 | | - echo "---Overwriting $NPM_CONFIG_USERCONFIG ---" |
57 | | - echo "@shopify:registry=https://registry.npmjs.org/" > "$NPM_CONFIG_USERCONFIG" |
58 | | - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> "$NPM_CONFIG_USERCONFIG" |
59 | | -
|
60 | | - # Debug info |
61 | | - echo "--- npm identity check ---" |
62 | | - npm whoami --registry=https://registry.npmjs.org/ |
63 | | -
|
64 | | - # Run with info logging |
65 | | - npm dist-tag add @shopify/[email protected] latest --loglevel=info |
66 | | -
|
| 48 | + # Known to fail in OIDC (https://github.com/npm/cli/issues/8547). |
| 49 | + # Workaround is to manually ask #help-eng-infrastructure to update `latest` tag. |
67 | 50 | - name: Set 'latest' NPM dist tag |
68 | 51 | if: steps.changesets.outputs.published == 'true' && github.ref_name == vars.LATEST_STABLE_VERSION |
69 | 52 | env: |
70 | 53 | PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.publishedPackages }} |
71 | | - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
72 | 54 | run: | |
73 | | - # dist-tag does not support OIDC yet, so fallback to classic token |
74 | | - # overwrite the .npmrc to ensure no OIDC session conflicts |
75 | | - echo "@shopify:registry=https://registry.npmjs.org/" > "$NPM_CONFIG_USERCONFIG" |
76 | | - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> "$NPM_CONFIG_USERCONFIG" |
77 | | -
|
78 | 55 | for pkg in $(echo "$PUBLISHED_PACKAGES" | jq -r '.[] | @base64'); do |
79 | 56 | _jq() { |
80 | 57 | echo ${pkg} | base64 --decode | jq -r ${1} |
|
0 commit comments