Update actions to versions running on Node20 #703
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: common.js | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "common.js/**" | |
pull_request: | |
workflow_dispatch: | |
defaults: | |
run: | |
working-directory: common.js | |
jobs: | |
common-js-detect-changes: | |
runs-on: ubuntu-latest | |
outputs: | |
path-filter: ${{ steps.filter.outputs.path-filter }} | |
steps: | |
- uses: actions/checkout@v4 | |
if: github.event_name == 'pull_request' | |
- uses: dorny/paths-filter@v3 | |
if: github.event_name == 'pull_request' | |
id: filter | |
with: | |
filters: | | |
path-filter: | |
- './common.js/**' | |
common-js-test: | |
needs: common-js-detect-changes | |
if: | | |
github.event_name != 'pull_request' | |
|| needs.common-js-detect-changes.outputs.path-filter == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "12.x" | |
- name: Install dependencies | |
run: yarn install | |
- name: Run tests | |
run: yarn test | |
common-js-lint: | |
needs: common-js-detect-changes | |
if: | | |
(github.event_name != 'pull_request' | |
&& github.event_name != 'schedule') | |
|| needs.common-js-detect-changes.outputs.path-filter == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "12.x" | |
- name: Install dependencies | |
run: yarn install | |
- name: Lint | |
run: yarn run lint | |
# Publishing of the common.js package has been switched off due to problems | |
# with package versioning. Below configuration can succesfully publish the | |
# package, but commiting of the information about bumped-up version to the Git | |
# repository doesn't work - commiter's user name and e-mail are required. | |
# Without this update of the version info, next runs of the common-js-publish | |
# generate the same version of package as before, and upload is not accepted. | |
# We may want to resolve that in the future. | |
# common-js-publish: | |
# needs: [common-js-test, common-js-lint] | |
# if: | |
# github.ref == 'refs/heads/main' | |
# && github.event_name != 'pull_request' | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: actions/setup-node@v4 | |
# with: | |
# node-version: "12.x" | |
# - name: Install dependencies | |
# run: yarn install | |
# - name: Publish to npm | |
# env: | |
# NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# run: yarn publish --prerelease --access public |