* chore(action): Rework action to be a composite action - Removed docker image and workflow around it - Externalizing `@sentry/cli` so it can be installed per-runner - Support versioning of actions publishing major, minor and patch tags allowing users to pin versions - Reduce action run time by 80% as a result Closes: #185, #193, #233 * Fix path * Add @sentry/cli as dev dep so we can build locally but have it overwritten on the CI by the install step * Improve changelog * Update .github/workflows/test.yml Co-authored-by: Francesco Gringl-Novy <[email protected]> * Remove caching of yarn cache * Remove volta in action itself * Remove fetch depths for ci tests * Pin @sentry/cli to ~2.4 * Change to `^2.4` * Read out workspace path directly in action * Add comment * Run lint and format * Add lint step to test.yml * Simplify workingDirectory checks --------- Co-authored-by: Francesco Gringl-Novy <[email protected]>
45 lines
949 B
YAML
45 lines
949 B
YAML
# Inspired by @action/checkout
|
|
#
|
|
# Compares the checked in `dist/index.js` with the PR's `dist/index.js`
|
|
# On mismatch this action fails
|
|
name: Verify dist
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths-ignore:
|
|
- "**.md"
|
|
pull_request:
|
|
paths-ignore:
|
|
- "**.md"
|
|
|
|
jobs:
|
|
check-dist:
|
|
name: Verify dist/index.js file
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Use volta
|
|
uses: volta-cli/action@v4
|
|
|
|
- name: Install dependencies
|
|
run: yarn install
|
|
|
|
- name: Rebuild dist
|
|
run: yarn build
|
|
|
|
- name: Compare expected and actual dist
|
|
run: |
|
|
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
|
|
echo "Detected uncommitted changes after build. Did you forget to commit `dist/index.js`?"
|
|
echo "Diff:"
|
|
git diff
|
|
exit 1
|
|
fi
|