Merge pull request #41 from reedsy/a11y #119
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: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
always-auth: true | |
registry-url: "https://npm.pkg.github.com" | |
scope: "@reedsy" | |
- name: Install | |
# Skip post-install to avoid malicious scripts stealing PAT | |
run: npm install --ignore-script | |
env: | |
# GITHUB_TOKEN can't access packages hosted in private repos, | |
# even within the same organisation | |
NODE_AUTH_TOKEN: ${{ secrets.REEDSY_BOT_PERSONAL_ACCESS_TOKEN }} | |
- name: Post-install | |
run: npm rebuild && npm run prepare --if-present | |
- name: Test | |
run: npm test | |
- name: Release | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: ./scripts/release.sh |