Skip to content

Commit

Permalink
ci(.github/workflows): publish fix. (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewhartstonge authored Oct 8, 2024
2 parents 7c0ca45 + d21219f commit 846f56a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,37 +63,37 @@ jobs:
NODE_AUTH_TOKEN: ${{ github.token }}
run: yarn run ci

- name: "Configure npm access"
id: configure_npm_access
env:
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm set //registry.npmjs.org/:_authToken=${NPM_REGISTRY_TOKEN}

- name: "Publish Pre-release"
id: publish_prerelease_yarn
if: ${{ inputs.prerelease }}
env:
NODE_AUTH_TOKEN: ${{ github.token }}
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
TAG=$(cat package.json | jq '.version' | sed -e 's/".*-\(.*\)"/\1/g')
yarn publish --tag=$TAG
npm set "//registry.npmjs.org/:_authToken=${NPM_REGISTRY_TOKEN}"
npm publish --tag=$TAG --provenance --access public --ignore-scripts --@linc-technologies:registry='https://registry.npmjs.org'
- name: "Publish Backport"
id: publish_backport_yarn
if: ${{ inputs.backport }}
env:
NODE_AUTH_TOKEN: ${{ github.token }}
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
TAG=$(cat package.json| jq -r .version)
yarn publish --new-version=$TAG
npm set "//registry.npmjs.org/:_authToken=${NPM_REGISTRY_TOKEN}"
npm publish --new-version=$TAG --provenance --access public --ignore-scripts --@linc-technologies:registry='https://registry.npmjs.org'
- name: "Publish"
id: publish_yarn
if: ${{ steps.publish_prerelease_yarn.outcome == 'skipped' && steps.publish_backport_yarn.outcome == 'skipped' }}
env:
NODE_AUTH_TOKEN: ${{ github.token }}
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
#yarn publish
npm set "//registry.npmjs.org/:_authToken=${NPM_REGISTRY_TOKEN}"
npm publish --provenance --access public --ignore-scripts --@linc-technologies:registry='https://registry.npmjs.org'

0 comments on commit 846f56a

Please sign in to comment.