Collection of reusable workflows for my GitHub actions
This workflow is used to build the source code and publish it to NPM public registry. It sets up node 20 and runs the build command and the license-check command with the --if-present
flag. It uses the semantic-release to do the release.
name: Publish to NPM
on:
push:
branches: ['master', 'beta', 'alpha']
jobs:
release:
uses: carpasse/reusable-workflows/.github/workflows/publishToNPM.yml@v1
secrets:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
This workflow is used to run the tests of the codebase. On Node versions 18, 20 and 21.
name: Run tests
on: [pull_request]
jobs:
validation:
uses: carpasse/reusable-workflows/.github/workflows/runTests.yml@v1
This workflow is used to build and lint the codebase. It sets up node 20 and runs the linting and build commands (with the --if-present
flag).
name: Validate Codebase
on: [pull_request]
jobs:
validation:
uses: carpasse/reusable-workflows/.github/workflows/validateCodebase.yml@v1
This workflow is used to validate the commit messages. It uses the wagoid/commitlint-github-action@5 action.
name: Validate commit messages
on: [pull_request]
jobs:
commitlint:
uses: carpasse/reusable-workflows/.github/workflows/validateCommits.yml@v1
This repository is licensed under the MIT License
This repository is inspired by inigomarquinez's reusable-workflows repository.