Build: ensuring CI Release works #66
Workflow file for this run
This file contains hidden or 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: CI | |
on: | |
push: | |
jobs: | |
test: | |
name: 'Test with Node version: ${{ matrix.node }}' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [node, lts/*] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: npm | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Lint | |
run: npm run lint | |
- name: Run Build | |
run: npm run build | |
- name: Run Jest | |
run: npx jest | |
publish: | |
needs: [test] | |
name: Publish NPM Package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PIPELINE_BOT_PAT }} | |
fetch-depth: 0 | |
persist-credentials: true | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: npm | |
- name: Install Dependencies | |
run: npm ci | |
- name: Semantic Release | |
env: | |
GIT_AUTHOR_NAME: 'im-pipeline-bot' | |
GIT_AUTHOR_EMAIL: '[email protected]' | |
GIT_COMMITTER_NAME: 'im-pipeline-bot' | |
GIT_COMMITTER_EMAIL: '[email protected]' | |
GITHUB_TOKEN: ${{ secrets.PIPELINE_BOT_PAT }} | |
GH_TOKEN: ${{ secrets.PIPELINE_BOT_PAT }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx semantic-release |