mirror of
https://github.com/softprops/action-gh-release.git
synced 2026-04-13 05:48:18 +08:00
* chore(deps): bump the npm group across 1 directory with 7 updates Bumps the npm group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) | `9.0.0` | `9.1.0` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.19.37` | `20.19.39` | | [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) | `4.1.0` | `4.1.4` | | [esbuild](https://github.com/evanw/esbuild) | `0.27.4` | `0.28.0` | | [prettier](https://github.com/prettier/prettier) | `3.8.1` | `3.8.2` | | [typescript](https://github.com/microsoft/TypeScript) | `5.9.3` | `6.0.2` | Updates `@actions/github` from 9.0.0 to 9.1.0 - [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github) Updates `@types/node` from 20.19.37 to 20.19.39 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `@vitest/coverage-v8` from 4.1.0 to 4.1.4 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.4/packages/coverage-v8) Updates `esbuild` from 0.27.4 to 0.28.0 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.27.4...v0.28.0) Updates `prettier` from 3.8.1 to 3.8.2 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.8.1...3.8.2) Updates `typescript` from 5.9.3 to 6.0.2 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.9.3...v6.0.2) Updates `vitest` from 4.1.0 to 4.1.4 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.4/packages/vitest) --- updated-dependencies: - dependency-name: "@actions/github" dependency-version: 9.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: npm - dependency-name: "@types/node" dependency-version: 20.19.39 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm - dependency-name: "@vitest/coverage-v8" dependency-version: 4.1.4 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm - dependency-name: esbuild dependency-version: 0.28.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: prettier dependency-version: 3.8.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm - dependency-name: typescript dependency-version: 6.0.2 dependency-type: direct:development update-type: version-update:semver-major dependency-group: npm - dependency-name: vitest dependency-version: 4.1.4 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm ... Signed-off-by: dependabot[bot] <support@github.com> * ci: comment on stale dist bundles Signed-off-by: Rui Chen <rui@chenrui.dev> * update dist/index.js Signed-off-by: Rui Chen <rui@chenrui.dev> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Rui Chen <rui@chenrui.dev> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Rui Chen <rui@chenrui.dev>
75 lines
2.3 KiB
YAML
75 lines
2.3 KiB
YAML
name: main
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
|
|
|
|
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
|
with:
|
|
node-version-file: ".tool-versions"
|
|
cache: "npm"
|
|
|
|
- name: Install
|
|
run: npm ci
|
|
- name: Build
|
|
run: npm run build
|
|
- name: Check dist freshness
|
|
id: dist_freshness
|
|
continue-on-error: true
|
|
run: |
|
|
git diff --exit-code --stat -- dist/index.js \
|
|
|| (echo "##[error] found changed dist/index.js after build. please run 'npm run build' and commit the updated bundle" \
|
|
&& exit 1)
|
|
- name: Comment on stale dist bundle
|
|
if: github.event_name == 'pull_request' && steps.dist_freshness.outcome == 'failure'
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GH_REPO: ${{ github.repository }}
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
run: |
|
|
marker='<!-- dist-freshness-check -->'
|
|
diff_stat="$(git diff --stat -- dist/index.js)"
|
|
body=$(cat <<EOF
|
|
$marker
|
|
\`dist/index.js\` changed after \`npm run build\`.
|
|
|
|
Please run \`npm run build\` and commit the regenerated bundle.
|
|
|
|
\`\`\`text
|
|
$diff_stat
|
|
\`\`\`
|
|
EOF
|
|
)
|
|
|
|
existing_id="$(
|
|
gh api "repos/$GH_REPO/issues/$PR_NUMBER/comments" \
|
|
--jq '.[] | select(.user.login == "github-actions[bot]" and (.body | contains("<!-- dist-freshness-check -->"))) | .id' \
|
|
| tail -n 1
|
|
)"
|
|
|
|
if [ -n "$existing_id" ]; then
|
|
gh api --method PATCH "repos/$GH_REPO/issues/comments/$existing_id" -f body="$body" >/dev/null
|
|
else
|
|
gh api --method POST "repos/$GH_REPO/issues/$PR_NUMBER/comments" -f body="$body" >/dev/null
|
|
fi
|
|
- name: Fail on stale dist bundle
|
|
if: steps.dist_freshness.outcome == 'failure'
|
|
run: |
|
|
echo "##[error] found changed dist/index.js after build. please run 'npm run build' and commit the updated bundle"
|
|
exit 1
|
|
- name: Test
|
|
run: npm run test
|
|
- name: Format
|
|
run: npm run fmtcheck
|