Skip to content

Commit

Permalink
use action
Browse files Browse the repository at this point in the history
  • Loading branch information
BowTiedDevOps committed Apr 4, 2024
1 parent c924505 commit c4168d9
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
CHANGED: ${{steps.check_version.outputs.changed}}
PACKAGE_PATH: ${{steps.set_path.outputs.changed_package_path}}
PACKAGE_MANIFEST_PATH: ${{steps.set_path.outputs.changed_manifest_path}}
steps:
- name: Checkout Code
id: checkout_code
Expand All @@ -34,7 +34,6 @@ jobs:
if [[ $path == packages/* ]]; then
for manifest in "${manifest_names[@]}"; do
if [[ -f $path/$manifest ]]; then
echo "changed_package_path=${path}" >> "$GITHUB_OUTPUT"
echo "changed_manifest_path=${path}/${manifest}" >> "$GITHUB_OUTPUT"
echo "package_changed=true" >> "$GITHUB_OUTPUT"
exit 0
Expand Down Expand Up @@ -71,11 +70,15 @@ jobs:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'

- name: Publish Package
id: publish_package
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: Npm CI
id: npm_ci
run: |
cd "$(echo '${{ needs.check_version_change.outputs.PACKAGE_PATH }}')"
npm ci
npm publish
- name: Publish Package
id: publish_package
uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c # v3.1.1
with:
token: ${{ secrets.NODE_AUTH_TOKEN }}
package: ${{ needs.check_version_change.outputs.PACKAGE_MANIFEST_PATH }}
access: public

0 comments on commit c4168d9

Please sign in to comment.