chore(deps): update dependency eslint to v9 #1606
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: main | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
needs-update: ${{ steps.diff.outcome != 'success' }} | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v4 | |
- run: npm ci | |
- run: npm run all | |
- run: node mock-server.js & | |
# sanity check | |
- name: run actions-coverage-upload | |
uses: ./ # Uses an action in the root directory | |
with: | |
server: "http://localhost:8080" | |
file: coverage/cobertura-coverage.xml | |
name: actions-coverage-upload | |
type: cobertura | |
# ca-cert: ${{ secrets.MTLS_CACERT }} | |
# client-cert: ${{ secrets.MTLS_CERT }} | |
# client-key: ${{ secrets.MTLS_KEY }} | |
- name: Check for changes (fail if we forgot to update dist folder) | |
run: git diff --quiet dist | |
id: diff | |
continue-on-error: true | |
- name: Set up commit signing w/ GPG | |
if: ${{ steps.diff.outcome != 'success' && !github.event.fork && !contains(github.ref, 'pull') }} | |
id: configure | |
uses: tradeshift/actions-git/configure-from-gpg-key@v1 | |
with: | |
gpg-key: ${{ secrets.TRADESHIFTCI_GPG_KEY }} | |
- name: PR build changes if needed | |
uses: tradeshift/create-pull-request@v6 | |
if: ${{ steps.diff.outcome != 'success' && !github.event.fork && !contains(github.ref, 'pull') }} | |
with: | |
commit-message: "build: update dist folder" | |
branch: release-update-dist | |
title: "Update for release: update package runtime" | |
body: | | |
This PR is created automatically because the repo has been changed | |
without updating the packaged version in the `dist` folder. | |
Before these changes can be released, the `dist` folder has to be | |
updated. By merging this when the build is green, a new release | |
will be created based on the list of changes since the last release. | |
For more info see [semantic-release.gitbook.io/semantic-release/](https://semantic-release.gitbook.io/semantic-release/) | |
token: ${{ secrets.GH_TOKEN }} | |
committer: ${{ steps.configure.outputs.user }} | |
author: ${{ steps.configure.outputs.user }} | |
release: | |
runs-on: ubuntu-latest | |
needs: [build] | |
# Run on non-fork branches only (master/main) | |
if: ${{ !github.event.fork && !contains(github.ref, 'pull') && needs.build.outputs.needs-update != 'true'}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: tradeshift/actions-semantic-release@v2 | |
id: semantic-release | |
with: | |
check_name: Semantic release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Action tags (major version tag) | |
if: ${{ steps.semantic-release.outputs.new_release_published }} | |
run: | | |
git tag -f v${{ steps.semantic-release.outputs.new_release_major_version }} | |
git push -f origin v${{ steps.semantic-release.outputs.new_release_major_version }} |