Skip to content

Commit d955ddf

Browse files
Julusianjstarpl
authored andcommitted
chore: support scoped package publishing SOFIE-4181 (Sofie-Automation#1536)
1 parent 92299f8 commit d955ddf

File tree

13 files changed

+1944
-890
lines changed

13 files changed

+1944
-890
lines changed

.github/workflows/node.yaml

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -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

.github/workflows/prerelease-libs.yml

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

0 commit comments

Comments
 (0)