devDependencies: bump lint-staged from 15.2.2 to 15.2.6 #335
Workflow file for this run
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: CI | |
on: push | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20, 21] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
check-latest: true | |
- name: Install dependencies | |
run: npm ci | |
- name: Prettier | |
run: npm run prettier | |
- name: ESLint | |
run: npm run eslint | |
- name: commitlint | |
run: npm run commitlint | |
- name: Tests | |
run: npm test | |
- name: Publish (test) | |
run: npm publish --dry-run | |
- name: Docs | |
run: npm run docs:build | |
- name: Coverage | |
run: npm run coverage | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} | |
flag-name: Node.js v${{ matrix.node-version }} | |
parallel: true | |
coverage: | |
needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} | |
parallel-finished: true | |
release: | |
if: ${{ github.ref == 'refs/heads/main' }} | |
needs: [test, coverage] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
check-latest: true | |
- name: Import GPG key | |
run: echo $GPG_KEY | base64 --decode | gpg --batch --import | |
env: | |
GPG_KEY: ${{ secrets.GPG_KEY }} | |
- name: Add the custom gpg executable | |
run: | | |
rm -rf /tmp/gpg.sh | |
echo 'gpg --batch --pinentry-mode=loopback --passphrase $GPG_KEY_PASSPHRASE $@' >> /tmp/gpg.sh | |
chmod +x /tmp/gpg.sh | |
- name: Setup git | |
run: | | |
git config commit.gpgsign true | |
git config user.signingkey $GPG_KEY_ID | |
git config gpg.program /tmp/gpg.sh | |
env: | |
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Release | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }} | |
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }} | |
GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |