Merge pull request #16 from PAIR-code/iislucas-improve-readme #12
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
# Release from main branch workflow. | |
name: Main branch check, build and release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
name: Release | |
environment: Semantic Release to NPM environment | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # To publish a GitHub release. | |
issues: write # To comment on released issues. | |
pull-requests: write # To comment on released pull requests. | |
id-token: write # To enable use of OIDC for npm provenance. | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: 'npm' | |
cache-dependency-path: ./package-lock.json | |
- name: Install dependencies | |
run: npm clean-install | |
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies | |
run: npm audit signatures | |
- name: Check code style | |
run: npm run prettier:check | |
- name: Lint & license header check | |
run: npm run lint | |
- name: Test | |
run: npm run test:ci | |
- name: Clean dist/ | |
run: npm run clean | |
- name: Build | |
run: npm run build | |
# - name: Package # There is not any special packaging right now | |
# run: npm run package | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx semantic-release |