Skip to content

Commit dc6ccf9

Browse files
committed
⚗️ Test publish
1 parent 3410f32 commit dc6ccf9

File tree

4 files changed

+26
-7
lines changed

4 files changed

+26
-7
lines changed

.github/workflows/nodejs.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ jobs:
3535
- name: Install dependencies
3636
if: runner.os == 'Windows'
3737
run: |
38-
pacman -Sy --noconfirm mingw-w64-x86_64-nodejs
38+
pacman -Sy --noconfirm mingw-w64-x86_64-nodejs mingw-w64-x86_64-gcc \
39+
make
3940
- uses: actions/setup-node@v4
4041
if: runner.os != 'Windows'
4142
with:
@@ -55,12 +56,24 @@ jobs:
5556
publish:
5657
runs-on: ubuntu-latest
5758
if: startsWith(github.ref, 'refs/tags/')
59+
needs:
60+
- build
5861
steps:
62+
- uses: actions/checkout@v4
5963
- uses: actions/download-artifact@v4
6064
with:
6165
pattern: artifact-*
6266
merge-multiple: true
6367
path: prebuilds
68+
- uses: actions/setup-node@v4
69+
with:
70+
node-version: latest
71+
registry-url: https://registry.npmjs.org
72+
cache: 'npm'
73+
- name: Build
74+
run: |
75+
npm install
76+
npm pack
6477
- uses: softprops/action-gh-release@v2
6578
with:
6679
files: '*.tgz'

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "xmake-build-system",
3-
"version": "2.9.7",
3+
"version": "2.9.5",
44
"description": "A cross-platform build utility based on Lua",
55
"repository": "https://github.com/xmake-io/xmake-wheel",
66
"homepage": "https://github.com/xmake-io/xmake-wheel#readme",

scripts/build.cjs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,21 @@ async function download(url, file) {
2828
});
2929
}
3030

31+
function run(...args) {
32+
const cmd = spawnSync(...args);
33+
console.log(cmd.stdout.toString())
34+
console.error(cmd.stderr.toString())
35+
}
36+
3137
(async () => {
3238
if (!fs.existsSync(file))
3339
await download(url, file)
3440
if (!fs.existsSync(cwd))
3541
await tar.x({file: file, C: '.'})
3642
if (!fs.existsSync(resolve(cwd, 'makefile')))
37-
spawnSync("./configure", [`--prefix=${prefix}`], {cwd: cwd})
43+
run("sh", ['configure', `--prefix=${prefix}`], {cwd: cwd})
3844
if (!fs.existsSync(resolve(cwd, 'build')))
39-
spawnSync("make", {cwd: cwd})
45+
run("make", {cwd: cwd})
4046
if (!fs.existsSync(resolve(prefix, 'bin', 'xmake')))
41-
spawnSync("make", ["install"], {cwd: cwd})
47+
run("make", ["install"], {cwd: cwd})
4248
})()

0 commit comments

Comments
 (0)