Merge pull request #107 from trustpilot/improve-ci #1
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-release | |
'on': | |
push: | |
branches: | |
- master | |
permissions: | |
contents: write | |
issues: write | |
packages: write | |
pull-requests: write | |
jobs: | |
made-with-tpgha: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Setting up NodeJs | |
id: setup-node-js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- name: npm ci | |
run: npm ci | |
shell: bash | |
- name: npm run lint | |
run: npm run lint | |
shell: bash | |
- name: npm run test | |
run: npm run test | |
shell: bash | |
- name: npm run build | |
run: npm run build | |
shell: bash | |
- name: npm run release | |
run: npx semantic-release | |
shell: bash | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |