Skip to content

Commit

Permalink
feat: pack dist.
Browse files Browse the repository at this point in the history
  • Loading branch information
Baggins800 committed May 27, 2024
1 parent 88ced9c commit 934d524
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: NPM Package
on:
push:
branches:
- main # Replace with your default branch name if it's different
- main
release:
types: [created]

Expand All @@ -18,6 +18,7 @@ jobs:
- run: npm ci
- run: npm run lint
- run: npm test
- run: npm run build

version:
runs-on: ubuntu-latest
Expand All @@ -33,12 +34,10 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "Ruan Luies"
- run: npm run release
- name: Set Git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "Ruan Luies"
- name: Push changes and tags
- name: Commit and push changes
run: |
git add .
git commit -m "chore(release): release new version"
git push --follow-tags origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -53,7 +52,14 @@ jobs:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
- run: npm run build
- run: npm pack
- name: Extract tarball and publish
run: |
mkdir -p publish
tar -xvf *.tgz -C publish --strip-components 1
cd publish
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Expand Down

0 comments on commit 934d524

Please sign in to comment.