NPM Package #101
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NPM Package | |
on: | |
push: | |
branches: | |
- 'mainnnn' | |
workflow_dispatch: | |
jobs: | |
validate-commits: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Validate commits | |
uses: webiny/[email protected] | |
test-build-publish: | |
needs: [validate-commits] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
issues: read | |
pull-requests: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@bepower' | |
- name: Install dependencies | |
run: npm ci | |
- name: Testing | |
run: npm test --workspaces --if-present | |
- name: Building typescript in packages | |
run: npm run build --workspaces --if-present | |
- name: Linting | |
run: npm run check | |
- name: Publish | |
run: 'npx auto shipit --message "ci: :memo: Update CHANGELOG.md [skip ci]"' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |