Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,17 @@ jobs:
cache: npm
- name: Install dependencies
run: npm ci
- name: Publish packages to npm
- name: Select projects
# a tag push (e.g. cli-0.21.4) publishes only its project, a manual run publishes all
run: |
if [ "$GITHUB_REF_TYPE" = "tag" ]; then
npx nx release publish --projects="${GITHUB_REF_NAME%-*}"
echo "PROJECTS=${GITHUB_REF_NAME%-*}" >> "$GITHUB_ENV"
else
npx nx release publish
echo "PROJECTS=cli,nx-plugin" >> "$GITHUB_ENV"
fi
- name: Build packages
# `nx release publish` only runs nx-release-publish tasks and skips their
# `build` dependency, so dist/ has to exist before it runs
run: npx nx run-many -t build --projects="$PROJECTS"
- name: Publish packages to npm
run: npx nx release publish --projects="$PROJECTS"
Loading