diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml index 5413410..d3054b9 100644 --- a/.github/workflows/coverage-report.yml +++ b/.github/workflows/coverage-report.yml @@ -20,7 +20,7 @@ jobs: id: sanitize_branch run: | # Replace invalid characters with a dash '-' - SANITIZED_BRANCH=$(echo "${{ github.head_ref }}" | sed 's/[\/\\:*?"<>|]/-/g') + SANITIZED_BRANCH=$(echo "${{ github.event.workflow_run.head_branch }}" | sed 's/[\/\\:*?"<>|]/-/g') echo "SANITIZED_BRANCH=$SANITIZED_BRANCH" >> $GITHUB_ENV - uses: actions/download-artifact@v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d25ee61..f407025 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -40,5 +40,8 @@ jobs: - name: Run tests run: yarn test + - name: Run prepublish + run: yarn workspaces foreach -A --no-private run prepublish + - name: Publish to npm run: yarn workspaces foreach -A --no-private npm publish --access public --tolerate-republish diff --git a/packages/di/package.json b/packages/di/package.json index 1e1ad1f..1dbe3a5 100644 --- a/packages/di/package.json +++ b/packages/di/package.json @@ -45,7 +45,7 @@ "ci:version": "yarn version $(yarn conventional-recommended-bump -p conventionalcommits -t di-v --commit-path .)", "ci:changelog": "conventional-changelog -p conventionalcommits -i CHANGELOG.md -s -t di-v --commit-path .", "ci:tag": "VERSION=$(grep '\"version\"' package.json | awk -F '\"' '{print $4}') && git add package.json CHANGELOG.md && git commit -m \"Release v$VERSION\" && git tag -a \"di-v$VERSION\" -m \"Release version $VERSION\" && git push", - "prepublish": "yarn run ci:version && yarn run ci:changelog && yarn run ci:tag", + "prepublish": "yarn run ci:version || exit 0 && yarn run ci:changelog && yarn run ci:tag", "test": "tests-runner", "test:ci": "CI=true yarn run test", "build": "tsc -b",