Bump ts-jest from 29.1.2 to 29.2.5 #1226
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: 'pull-request' | |
on: | |
pull_request_target: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
- labeled | |
- unlabeled | |
jobs: | |
# validates that the pull request is trusted | |
verify: | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
VERIFIED_LABEL=${{ contains(github.event.pull_request.labels.*.name, 'verified') }} | |
if [[ ( $VERIFIED_LABEL == 'false' ) ]]; then | |
echo "Pull request is not from a trusted source!" | |
exit 1 | |
fi | |
unit-tests: | |
needs: [ verify ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: npm install | |
- run: npm run all | |
changelog: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
token: ${{ secrets.ACTION_TOKEN }} | |
- id: read_version | |
run: | | |
echo "version=$(jq -r ".version" package.json)" >> $GITHUB_OUTPUT | |
echo "tag=v$(jq -r ".version" package.json)" >> $GITHUB_OUTPUT | |
- uses: ./ | |
with: | |
activationLabels: 'dependabot,automerge' | |
sort: 'alpha' | |
- id: auto-commit | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "Updated Changelog" | |
- id: changelog-enforcer | |
# If changes were detected, it would include a changelog | |
# Skip enforcing the changelog and wait for the next commit to trigger the workflow | |
if: steps.auto-commit.outputs.changes_detected == 'false' | |
uses: dangoslen/changelog-enforcer@v3 | |
with: | |
expectedLatestVersion: ${{ steps.read_version.outputs.version }} | |
- if: failure() | |
name: Comment About Failure | |
uses: thollander/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
comment_tag: failure | |
mode: recreate | |
message: | | |
Hey @${{ github.event.pull_request.user.login }}, the Changelog Enforcer failed. Can you take a look at the error below and correct it? Thanks! | |
``` | |
${{ steps.changelog-enforcer.outputs.errorMessage }} | |
``` | |
- id: changelog_reader | |
name: Read Changelog | |
uses: mindsers/changelog-reader-action@v2 | |
with: | |
version: ${{ steps.read_version.outputs.version }} | |
path: ./CHANGELOG.md | |
- id: check_release | |
name: Check for Existing Release | |
run: | | |
TAG=$(git ls-remote --tags origin | grep ${{ steps.read_version.outputs.tag }} | cat ) | |
MISSING=$([[ -z "$TAG" ]] && echo 'true' || echo 'false') | |
echo "missing=$MISSING" >> $GITHUB_OUTPUT | |
- if: ${{ steps.check_release.outputs.missing == 'true' }} | |
name: Preview Release Notes | |
uses: thollander/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
comment_tag: release-notes | |
mode: recreate | |
message: | | |
<details> | |
<summary>Preview of Release Notes to be Created :ship:</summary> | |
${{ steps.changelog_reader.outputs.changes }} | |
</details> | |
automerge: | |
needs: [ unit-tests, changelog ] | |
runs-on: ubuntu-latest | |
steps: | |
- id: automerge | |
name: automerge | |
uses: "pascalgn/[email protected]" | |
env: | |
GITHUB_TOKEN: "${{ secrets.ACTION_TOKEN }}" |