@@ -668,91 +668,6 @@ jobs:
668668 publish_dir : ./packages/documentation/build
669669 force_orphan : true
670670
671- release-libs :
672- name : Release Lib
673- runs-on : ubuntu-latest
674- timeout-minutes : 15
675-
676- # only run for tags
677- if : contains(github.ref, 'refs/tags/')
678-
679- needs :
680- - test-packages
681- # core must be published first
682- - build-core
683-
684- steps :
685- - uses : actions/checkout@v5
686- with :
687- persist-credentials : false
688- - name : Use Node.js
689- uses : actions/setup-node@v6
690- with :
691- node-version-file : " .node-version"
692- - name : Prepare Environment # have to run this first to make sure the semver lib is available
693- run : |
694- corepack enable
695-
696- yarn config set cacheFolder /home/runner/release-libs-cache
697-
698- cd packages
699- yarn install
700- env :
701- CI : true
702- - name : Check release is desired
703- id : do-publish
704- run : |
705- if [ -z "${{ secrets.NPM_TOKEN }}" ]; then
706- echo "No Token"
707- else
708- # make dependencies of `determine-npm-tag` available
709- yarn install --mode=skip-build
710-
711- cd packages
712- PACKAGE_NAME="@sofie-automation/shared-lib"
713- PUBLISHED_VERSION=$(yarn npm info --json $PACKAGE_NAME | jq -c '.version' -r)
714- THIS_VERSION=$(node -p "require('./lerna.json').version")
715- NPM_TAG=$(node ../scripts/determine-npm-tag.js $PUBLISHED_VERSION $THIS_VERSION)
716-
717- echo "Publishing $NPM_TAG"
718- echo "tag=$NPM_TAG" >> $GITHUB_OUTPUT
719-
720- fi
721- - name : Build
722- if : ${{ steps.do-publish.outputs.tag }}
723- run : |
724- cd packages
725- yarn build
726- env :
727- CI : true
728- - name : Build OpenAPI client library
729- if : ${{ steps.do-publish.outputs.tag }}
730- run : |
731- cd packages/openapi
732- yarn build
733- env :
734- CI : true
735- - name : Modify dependencies to use npm packages
736- run : node scripts/prepublish.js
737- - name : Publish to NPM
738- if : ${{ steps.do-publish.outputs.tag }}
739- run : |
740- echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
741-
742- # hack as it can sometimes have unexpected changes
743- git checkout .yarnrc.yml
744-
745- cd packages
746- git checkout .yarnrc.yml
747-
748- yarn lerna publish from-package --tag-version-prefix='' --dist-tag ${{ steps.do-publish.outputs.tag }} --yes --no-verify-access
749-
750- NEW_VERSION=$(node -p "require('./package.json').version")
751- echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
752- echo "**Published:** $NEW_VERSION" >> $GITHUB_STEP_SUMMARY
753- env :
754- CI : true
755-
756671 check-for-multiple-library-versions :
757672 name : Check for multiple library versions
758673 runs-on : ubuntu-latest
0 commit comments