Skip to content

Commit

Permalink
ci(cd): standardise @Fdawgs cd workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Mar 8, 2024
1 parent 5d4072d commit 2b0a000
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ jobs:
- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Build docs and TS definitions, and remove dev values
# Build docs/definitions, and remove dev values
# from package.json before publishing to reduce package size
run: |
npm i --ignore-scripts
npm run build
npm run build --if-present
npm pkg delete commitlint devDependencies jest scripts
npm publish --access public --ignore-scripts --provenance
Expand All @@ -66,6 +66,7 @@ jobs:
needs: release
if: needs.release.outputs.release_created == 'true'
runs-on: ubuntu-latest
environment: main
permissions:
contents: read
id-token: write
Expand All @@ -85,16 +86,16 @@ jobs:

- name: Scope package
run: |
pkgName=$(npm pkg get name | tr -d '"')
pkgName=$(node -p "require('./package.json').name")
npm pkg set name="@fdawgs/$pkgName"
- name: Publish to GitHub Packages
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Build docs and TS definitions, and remove dev values
# Build docs/definitions, and remove dev values
# from package.json before publishing to reduce package size
run: |
npm i --ignore-scripts
npm run build
npm run build --if-present
npm pkg delete commitlint devDependencies jest scripts
npm publish --access public --ignore-scripts --provenance

0 comments on commit 2b0a000

Please sign in to comment.