Update GitHub Action Versions #121
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: Tag and Release Updated NPM Package | |
on: | |
pull_request_target: | |
push: | |
branches: | |
- main | |
- next | |
- beta | |
- "*.x" | |
repository_dispatch: | |
types: [semantic-release] | |
concurrency: | |
group: ci-${{ github.event.pull_request.number }}${{ github.ref }}${{ github.workflow }} | |
cancel-in-progress: true | |
permissions: | |
issues: write | |
pull-requests: write | |
statuses: write | |
checks: write | |
actions: write | |
id-token: write | |
contents: write | |
jobs: | |
run-tests: | |
name: Run unit tests | |
runs-on: ubuntu-latest | |
env: | |
SKIP_PREFLIGHT_CHECK: true | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
with: | |
ref: ${{ github.head_ref || github.ref }} | |
- name: Install compatible Nodejs version | |
id: setup-node | |
uses: ./.github/actions/setup-node | |
- name: Configure PATH | |
run: | | |
mkdir -p "$HOME/.local/bin" | |
echo "$HOME/.local/bin" >> "${GITHUB_PATH}" | |
echo "HOME=$HOME" >> "${GITHUB_ENV}" | |
- run: npm install | |
- run: npm run test | |
- run: npm run coverage | |
- name: 'Report Coverage' | |
if: always() | |
continue-on-error: true | |
uses: davelosert/vitest-coverage-report-action@v2.8.0 | |
with: | |
json-summary-path: './out/coverage-summary.json' | |
json-final-path: ./out/coverage-final.json | |
- run: npm run build | |
- run: npm run generate-docs | |
call-workflow-passing-data: | |
needs: run-tests | |
if: ${{ github.event_name == 'push' }} | |
permissions: | |
issues: write | |
pull-requests: write | |
statuses: write | |
checks: write | |
actions: write | |
id-token: write | |
contents: write | |
uses: ./.github/workflows/deploy.yml | |
with: | |
ref: ${{ github.head_ref || github.ref }} | |
secrets: inherit |