Release v11.6.1 - Security patch #71
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
on: | |
pull_request: | |
types: [closed, opened] | |
jobs: | |
dry-run: | |
runs-on: ubuntu-latest | |
timeout-minutes: ${{ fromJSON(vars.DEFAULT_JOB_TIMEOUT_MINUTES) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- run: npm ci | |
- name: Check formatting | |
run: | | |
set -eo pipefail | |
files_to_format=$(npm run format:check --silent || true) | |
if [ -n "$files_to_format" ]; then | |
echo "The following files are not formatted correctly:" | |
echo "$files_to_format" | |
{ | |
echo "formatted_files<<EOF" | |
echo "$files_to_format" | |
echo "EOF" | |
echo "formatting_needed=true" | |
} >> $GITHUB_OUTPUT | |
exit 1 | |
else | |
echo "All files are formatted correctly." | |
echo "formatting_needed=false" >> $GITHUB_OUTPUT | |
fi | |
- run: npm test | |
- uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
dry-run: true | |
publish: | |
needs: dry-run | |
if: github.event.pull_request.merged == true && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
timeout-minutes: ${{ fromJSON(vars.DEFAULT_JOB_TIMEOUT_MINUTES) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- run: npm ci | |
- run: npm test | |
- uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} |