diff --git a/.github/workflows/canary-release.yml b/.github/workflows/canary-release.yml index 0356990c5e61..302f992f7c2a 100644 --- a/.github/workflows/canary-release.yml +++ b/.github/workflows/canary-release.yml @@ -6,6 +6,7 @@ on: branches: - main - docusaurus-v** + - slorber/test-canary-trusted-publisher paths: - .github/workflows/canary-release.yml - package.json @@ -13,6 +14,7 @@ on: permissions: contents: read + id-token: write # For OIDC, see https://docs.npmjs.com/trusted-publishers jobs: publish-canary: @@ -23,27 +25,36 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 # Needed to get the commit number with "git rev-list --count HEAD" + - name: Set up Node uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 with: node-version: lts/* cache: yarn + + # Ensure npm 11.5.1 or later is installed for OIDC + - name: Update npm + run: | + npm install -g npm@latest + npm --version + - name: Prepare git run: | git config --global user.name "Docusaurus Canary" git config --global user.email "canary@docusaurus.io" git fetch - git checkout main - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc - cat .npmrc - echo "npm whoami" - npm whoami - env: - NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + git checkout + git log + + - name: TEST PUBLISH + run: | + cd packages/stylelint-copyright + cat package.json + npm publish --tag TEST + - name: Installation run: yarn || yarn || yarn + - name: Publish Canary release run: | yarn canary - env: - NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/packages/stylelint-copyright/package.json b/packages/stylelint-copyright/package.json index ad120b3f7b05..0e9b708ca30c 100644 --- a/packages/stylelint-copyright/package.json +++ b/packages/stylelint-copyright/package.json @@ -1,6 +1,6 @@ { "name": "stylelint-copyright", - "version": "3.9.2", + "version": "0.0.0-4753", "description": "Stylelint plugin to check CSS files for a copyright header.", "main": "lib/index.js", "license": "MIT",