Skip to content

Commit

Permalink
chore: use env to run publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Bielik20 committed Dec 2, 2022
1 parent 31d1750 commit 3f13cd9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ jobs:
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
with:
affected: true
- name: Start Release
id: semantic
run: npx semantic-release --dry-run
- name: Build
run: yarn nx affected --target build --parallel 3 --base ${{ steps.semantic.outputs.last-head || 'HEAD' }}
- name: Publish
run: yarn nx affected --target publish --parallel 3 --base ${{ steps.semantic.outputs.last-head || 'HEAD' }} --pkgVersion ${{ steps.semantic.outputs.next-version }} --tag ${{ steps.semantic.outputs.channel }}
run: yarn nx affected --target publish --parallel 3
env:
NPM_PACKAGE_TAG: ${{ steps.semantic.outputs.channel }}
NPM_PACKAGE_VERSION: ${{ steps.semantic.outputs.next-version }}
- name: Finish Release
run: npx semantic-release
13 changes: 11 additions & 2 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,17 @@
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"targetDefaults": {
"publish": {
"dependsOn": ["^publish"],
"inputs": ["production", "^production"]
"dependsOn": ["^publish", "build"],
"inputs": [
"production",
"^production",
{
"env": "NPM_PACKAGE_TAG"
},
{
"env": "NPM_PACKAGE_VERSION"
}
]
},
"build": {
"dependsOn": ["^build"],
Expand Down

0 comments on commit 3f13cd9

Please sign in to comment.