Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
dependabot-action/.github/workflows/check-dist.yml
View runs Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
45 lines (36 sloc)
1.09 KB
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: Check dist | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- 'releases/*' | |
jobs: | |
verify-build: # make sure the checked in dist/ folder matches the output of a rebuild | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Read .nvmrc | |
id: nvm | |
run: echo ::set-output name=NVMRC::$(cat .nvmrc) | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ steps.nvm.outputs.NVMRC }} | |
- name: Install npm dependencies | |
run: npm clean-install | |
- name: Rebuild the dist/ directory | |
run: npm run package | |
- name: Compare the expected and actual dist/ directories | |
run: script/check-diff | |
verify-index-js: # make sure the entrypoint js files run on a clean machine without compiling first | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: ./ | |
with: | |
milliseconds: 1000 |