Skip to content

Commit

Permalink
feat: Added publish target
Browse files Browse the repository at this point in the history
  • Loading branch information
TriPSs committed Jun 22, 2023
1 parent 1db4248 commit 6f1844f
Show file tree
Hide file tree
Showing 24 changed files with 121 additions and 145 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: yarn install

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v1
uses: tripss/nx-extend/actions/set-shas@improvements
with:
main-branch-name: master

Expand Down
30 changes: 18 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install

- name: Set correct env vars
id: script
uses: ./tools/actions/set-master-vars

release:
needs: [ prepare-env ]
runs-on: ubuntu-latest
Expand All @@ -52,23 +48,33 @@ jobs:
**/node_modules
key: ${{ env.DEPENDENCIES_CACHE }}-${{ hashFiles('yarn.lock') }}

- name: GIT config
- name: GIT/NPM config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: tripss/nx-extend/actions/set-shas@improvements
with:
main-branch-name: master

- name: nx affected:version
run: node ./tools/scripts/run-many.js version origin/${{ needs.prepare-env.outputs.GITHUB_HEAD_REF }} ${{ needs.prepare-env.outputs.GITHUB_BASE_REF }}
uses: ./actions/run-many
with:
target: version

- name: nx affected:build
run: node ./tools/scripts/run-many.js build origin/${{ needs.prepare-env.outputs.GITHUB_HEAD_REF }} ${{ needs.prepare-env.outputs.GITHUB_BASE_REF }}
uses: ./actions/run-many
with:
target: build

- name: nx affected:publish
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
node ./tools/scripts/run-many.js publish origin/${{ needs.prepare-env.outputs.GITHUB_HEAD_REF }} ${{ needs.prepare-env.outputs.GITHUB_BASE_REF }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
uses: ./actions/run-many
with:
target: publish

- name: Push GIT
run: git push --follow-tags origin ${{ needs.prepare-env.outputs.GITHUB_HEAD_REF }}
6 changes: 6 additions & 0 deletions packages/changelog-notify/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/changelog-notify --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/core/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/core --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/e2e-runner/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/e2e-runner --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/firebase-hosting/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/firebase-hosting --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/gcp-cloud-run/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/gcp-cloud-run --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/gcp-deployment-manager/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/gcp-deployment-manager --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/gcp-functions/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/gcp-functions --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/gcp-secrets/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/gcp-secrets --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/gcp-storage/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/gcp-storage --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/gcp-task-runner/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/gcp-task-runner --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/github-pages/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/github-pages --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/playwright/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/playwright --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/pulumi/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/pulumi --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/strapi/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/strapi --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/terraform/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/terraform --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/translations/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/translations --access public"
}
}
},
"tags": []
Expand Down
6 changes: 6 additions & 0 deletions packages/vercel/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
"options": {
"versionTagPrefix": "${target}@"
}
},
"publish": {
"executor": "nx:run-commands",
"options": {
"command": "npm publish ./dist/packages/vercel --access public"
}
}
},
"tags": []
Expand Down
6 changes: 0 additions & 6 deletions tools/actions/pr-log-changed-projects/action.yml

This file was deleted.

27 changes: 0 additions & 27 deletions tools/actions/pr-log-changed-projects/src/index.js

This file was deleted.

14 changes: 0 additions & 14 deletions tools/actions/set-master-vars/action.yml

This file was deleted.

22 changes: 0 additions & 22 deletions tools/actions/set-master-vars/src/index.js

This file was deleted.

Loading

0 comments on commit 6f1844f

Please sign in to comment.