Merge pull request #33 from OnedocLabs/AugusteLef-patch-3 #202
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: Build and Publish | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "docs/**" | |
- "docgen/**" | |
- ".gitignore" | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ secrets.APP_ID }} | |
private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: npm | |
registry-url: "https://registry.npmjs.org" | |
cache-dependency-path: ./package-lock.json | |
- run: npm install | |
working-directory: . | |
- run: npm run build | |
working-directory: . | |
- run: npm test | |
working-directory: . | |
- run: npm version patch -m "Bump version to %s [skip ci]" --git-tag-version false | |
working-directory: . | |
- run: npm publish --access public | |
working-directory: . | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_options: "--no-verify" | |
commit_message: "Bump version [skip ci]" |