Skip to content

Commit 94d2830

Browse files
ENH: Add automatic rebuild (#72)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent c91e2b4 commit 94d2830

File tree

3 files changed

+30442
-8972
lines changed

3 files changed

+30442
-8972
lines changed

.github/workflows/autofix.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: autofix.ci
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
4+
cancel-in-progress: true
5+
6+
on: # yamllint disable-line rule:truthy
7+
# We only do this on PRs to avoid the (admittedly unlikely) scenario that
8+
# we run, green, wait, merge, then the build on `main` could fail because conda
9+
# has updated during the "green" and then the "build on `main`" steps
10+
pull_request:
11+
branches: ["*"]
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
name: Rebuild dist
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.12"
22+
- run: npm install
23+
- run: npm i -g @vercel/ncc
24+
- run: ncc build index.js
25+
env:
26+
NODE_OPTIONS: "--openssl-legacy-provider"
27+
- uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ customization options.
8585

8686
## Contributing
8787

88-
Make sure you have done `npm install` to get all dependencies and used
89-
`ncc build index.js` before committing and opening a PR. On Ubuntu you might
88+
Make any changes needed to `package-lock.json` and `index.js` and open a PR.These changes will automatically be compiled into `dist/index.js` by the
89+
[autofix.ci bot](https://autofix.ci/).
90+
91+
If you want to do the same work locally as the bot, use `npm install` to get
92+
all dependencies and then call `ncc build index.js`. On Ubuntu you might
9093
need to `export NODE_OPTIONS=--openssl-legacy-provider` before the `ncc build`
9194
step.

0 commit comments

Comments
 (0)