mirror of
https://github.com/copy/v86.git
synced 2025-12-31 04:23:15 +00:00
update package.json version earlier
This commit is contained in:
parent
59ffdcb2dd
commit
4990c43930
2 changed files with 6 additions and 12 deletions
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
|
|
@ -115,6 +115,9 @@ jobs:
|
|||
- name: Run expect tests
|
||||
run: make expect-tests
|
||||
|
||||
- name: Update package.json version
|
||||
run: make update-package-json-version
|
||||
|
||||
- name: Upload the artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
|
@ -150,18 +153,6 @@ jobs:
|
|||
- name: Display structure of downloaded files
|
||||
run: ls -R
|
||||
|
||||
- name: Set package.json version
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const fs = require("fs");
|
||||
const { execFileSync } = require("child_process")
|
||||
const version = execFileSync("git", ["describe", "--tags"], { encoding: "utf8" }).trim().replace("-", ".");
|
||||
const pkg = { ...require("./package.json"), version };
|
||||
console.log(pkg);
|
||||
fs.writeFileSync("package.json", JSON.stringify(pkg, null, " "), "utf8");
|
||||
|
||||
- name: Release to GitHub
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
|
|
|
|||
3
Makefile
3
Makefile
|
|
@ -385,3 +385,6 @@ build/xterm.js:
|
|||
curl https://cdn.jsdelivr.net/npm/xterm@5.2.1/lib/xterm.min.js > build/xterm.js
|
||||
curl https://cdn.jsdelivr.net/npm/xterm@5.2.1/lib/xterm.js.map > build/xterm.js.map
|
||||
curl https://cdn.jsdelivr.net/npm/xterm@5.2.1/css/xterm.css > build/xterm.css
|
||||
|
||||
update-package-json-version:
|
||||
jq --arg version "$$(git describe --tags | sed 's/-/./' | tr - +)" '.version = $$version' package.json | sponge package.json
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue