Bump @types/node from 20.11.20 to 20.12.8 #1158
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: 'build-test' | |
on: # rebuild any PRs and main branch changes | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
build: # make sure build/ci work properly | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install node dependencies | |
run: | | |
npm install | |
- name: Build dist and run tests | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npm run all | |
- name: Upload dist | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
test: # make sure the action works on a clean machine without building | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: Run tests | |
uses: ./ | |
with: | |
path: __tests__ | |
dry-run: true | |
check-repo: ${{ github.event_name == 'push' }} | |
publish: # publish dependency-free release with only self-contained dist directory | |
if: github.event_name == 'push' && github.ref_name == 'main' | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- test | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
- name: Download dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: Commit dist | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add dist | |
git commit -m "Added dist files" | |
git tag v2 -f | |
- name: Push dist | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: dist/v2 | |
tags: true | |
force: true |