@@ -547,91 +547,6 @@ jobs:
547547 github_token : ${{ secrets.GITHUB_TOKEN }}
548548 publish_dir : ./packages/documentation/build
549549
550- release-libs :
551- name : Release Lib
552- runs-on : ubuntu-latest
553- timeout-minutes : 15
554-
555- # only run for tags
556- if : contains(github.ref, 'refs/tags/')
557-
558- needs :
559- - test-packages
560- # core must be published first
561- - build-core
562-
563- steps :
564- - uses : actions/checkout@v4
565- with :
566- persist-credentials : false
567- - name : Use Node.js
568- uses : actions/setup-node@v4
569- with :
570- node-version-file : " .node-version"
571- - name : Prepare Environment # have to run this first to make sure the semver lib is available
572- run : |
573- corepack enable
574-
575- yarn config set cacheFolder /home/runner/release-libs-cache
576-
577- cd packages
578- yarn install
579- env :
580- CI : true
581- - name : Check release is desired
582- id : do-publish
583- run : |
584- if [ -z "${{ secrets.NPM_TOKEN }}" ]; then
585- echo "No Token"
586- else
587- # make dependencies of `determine-npm-tag` available
588- yarn install --mode=skip-build
589-
590- cd packages
591- PACKAGE_NAME="@sofie-automation/shared-lib"
592- PUBLISHED_VERSION=$(yarn npm info --json $PACKAGE_NAME | jq -c '.version' -r)
593- THIS_VERSION=$(node -p "require('./lerna.json').version")
594- NPM_TAG=$(node ../scripts/determine-npm-tag.js $PUBLISHED_VERSION $THIS_VERSION)
595-
596- echo "Publishing $NPM_TAG"
597- echo "tag=$NPM_TAG" >> $GITHUB_OUTPUT
598-
599- fi
600- - name : Build
601- if : ${{ steps.do-publish.outputs.tag }}
602- run : |
603- cd packages
604- yarn build
605- env :
606- CI : true
607- - name : Build OpenAPI client library
608- if : ${{ steps.do-publish.outputs.tag }}
609- run : |
610- cd packages/openapi
611- yarn build
612- env :
613- CI : true
614- - name : Modify dependencies to use npm packages
615- run : node scripts/prepublish.js
616- - name : Publish to NPM
617- if : ${{ steps.do-publish.outputs.tag }}
618- run : |
619- echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
620-
621- # hack as it can sometimes have unexpected changes
622- git checkout .yarnrc.yml
623-
624- cd packages
625- git checkout .yarnrc.yml
626-
627- yarn lerna publish from-package --tag-version-prefix='' --dist-tag ${{ steps.do-publish.outputs.tag }} --yes --no-verify-access
628-
629- NEW_VERSION=$(node -p "require('./package.json').version")
630- echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
631- echo "**Published:** $NEW_VERSION" >> $GITHUB_STEP_SUMMARY
632- env :
633- CI : true
634-
635550 check-for-multiple-library-versions :
636551 name : Check for multiple library versions
637552 runs-on : ubuntu-latest
0 commit comments