Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(.github/workflows): publish fix. #32

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'