Skip to content

Commit

Permalink
fix: use environment variables in NX (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaroslav-affinidi authored Feb 3, 2025
1 parent 3393da2 commit 1b57cbc
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF#refs/tags/} | cut -d'-' -f2 | cut -c2-)" >> $GITHUB_ENV

- name: Publish Tagged Project
run: npx nx run ${{ env.PROJECT_NAME }}:publish --args="--releaseVersion=${{ env.RELEASE_VERSION }}"
run: npx nx run ${{ env.PROJECT_NAME }}:publish"
5 changes: 3 additions & 2 deletions packages/dart/auth_provider/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
"options": {
"cwd": "{projectRoot}",
"commands": [
"sed -i \"s|^version: .*|version: {args.releaseVersion}|\" pubspec.yaml",
"dart pub publish --force"
"[ -z \"$RELEASE_VERSION\" ] && echo 'ERROR: RELEASE_VERSION is not set.' && exit 1",
"sed -i \"s|^version: .*|version: ${RELEASE_VERSION}|\" pubspec.yaml",
"dart pub publish --skip-validation --force"
],
"parallel": false
}
Expand Down
5 changes: 3 additions & 2 deletions packages/dart/common/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
"options": {
"cwd": "{projectRoot}",
"commands": [
"sed -i \"s|^version: .*|version: {args.releaseVersion}|\" pubspec.yaml",
"dart pub publish --force"
"[ -z \"$RELEASE_VERSION\" ] && echo 'ERROR: RELEASE_VERSION is not set.' && exit 1",
"sed -i '' \"s|^version: .*|version: ${RELEASE_VERSION}|\" pubspec.yaml",
"dart pub publish --skip-validation --force"
],
"parallel": false
}
Expand Down
5 changes: 3 additions & 2 deletions packages/dart/consumer_auth_provider/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
"options": {
"cwd": "{projectRoot}",
"commands": [
"sed -i \"s|^version: .*|version: {args.releaseVersion}|\" pubspec.yaml",
"dart pub publish --force"
"[ -z \"$RELEASE_VERSION\" ] && echo 'ERROR: RELEASE_VERSION is not set.' && exit 1",
"sed -i '' \"s|^version: .*|version: ${RELEASE_VERSION}|\" pubspec.yaml",
"dart pub publish --skip-validation --force"
],
"parallel": false
}
Expand Down
5 changes: 3 additions & 2 deletions packages/dart/cryptography/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
"options": {
"cwd": "{projectRoot}",
"commands": [
"sed -i \"s|^version: .*|version: {args.releaseVersion}|\" pubspec.yaml",
"dart pub publish --force"
"[ -z \"$RELEASE_VERSION\" ] && echo 'ERROR: RELEASE_VERSION is not set.' && exit 1",
"sed -i \"s|^version: .*|version: ${RELEASE_VERSION}|\" pubspec.yaml",
"dart pub publish --skip-validation --force"
],
"parallel": false
}
Expand Down

0 comments on commit 1b57cbc

Please sign in to comment.