chore(deps): bump actions/setup-node from 3 to 4 #604
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: 'CI' | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [16, 18] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: yarn install --ignore-engines | |
- name: Check format and lint | |
run: yarn run format-check && yarn lint | |
- name: Build and package | |
run: yarn build && yarn run package | |
- name: Update docs | |
uses: './' | |
- run: cat README.md | |
- name: Check for modified files | |
id: changes | |
if: matrix.node-version == 18 | |
run: | | |
echo "files=$(git ls-files -m)" >>$GITHUB_OUTPUT | |
echo "count=$(git ls-files -m | wc -l)" >>$GITHUB_OUTPUT | |
- uses: actions/[email protected] | |
if: github.event_name == 'pull_request' && steps.changes.outputs.count != 0 && matrix.node-version == 18 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const output = `#### Changes detected | |
Please verify you have updated the files below. | |
<details><summary>The following files are changed during the build</summary> | |
\`\`\`${{ steps.changes.outputs.files }}\`\`\` | |
</details> | |
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Workflow: \`${{ github.workflow }}\`*`; | |
await github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: output | |
}) | |
- name: Update dist in the repository | |
if: github.event_name != 'pull_request' && matrix.node-version == 18 | |
uses: stefanzweifel/[email protected] | |
with: | |
commit_message: "chore(ci): Updating dist" | |
file_pattern: dist/* | |
- name: Update readme in the repository | |
if: github.event_name != 'pull_request' && matrix.node-version == 18 | |
uses: stefanzweifel/[email protected] | |
with: | |
commit_message: "chore(ci): Updating README" | |
file_pattern: README.md | |
- name: Release | |
if: | |
contains(' | |
refs/heads/main | |
', github.ref) && matrix.node-version == 18 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: yarn release |