Skip to content

Commit e98ca90

Browse files
authored
chore: support scoped package publishing SOFIE-4181 (Sofie-Automation#1536)
1 parent 5578d06 commit e98ca90

File tree

20 files changed

+1935
-867
lines changed

20 files changed

+1935
-867
lines changed

.github/workflows/node.yaml

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -664,91 +664,6 @@ jobs:
664664
publish_dir: ./packages/documentation/build
665665
force_orphan: true
666666

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

.github/workflows/prerelease-libs.yml

Lines changed: 0 additions & 164 deletions
This file was deleted.

0 commit comments

Comments
 (0)