Compare commits

...

1 Commits

Author SHA1 Message Date
Andrei Pangin
9cd3fdd42b Release binaries with GHA 2025-07-21 13:55:31 +01:00

View File

@@ -65,10 +65,10 @@ jobs:
case "${{ matrix.runson.display }}" in
macos*)
brew install gcovr
make COMMIT_TAG=$HASH FAT_BINARY=true release coverage -j
make FAT_BINARY=true release coverage -j
;;
*)
make COMMIT_TAG=$HASH CC=/usr/local/musl/bin/musl-gcc release coverage -j
make CC=/usr/local/musl/bin/musl-gcc release coverage -j
echo "debug_archive=$(find . -type f -name "async-profiler-*-debug*" -exec basename {} \;)" >> $GITHUB_OUTPUT
;;
esac
@@ -247,7 +247,7 @@ jobs:
build/test/logs/
hs_err*.log
publish-only-on-push:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
if: github.event_name == 'push' && github.ref == 'refs/heads/release'
name: publish (nightly)
runs-on: ubuntu-latest
needs: [build-jars, integration-tests]
@@ -267,32 +267,12 @@ jobs:
owner: "async-profiler",
repo: "async-profiler",
};
let previousRelease = undefined;
try {
previousRelease = await github.rest.repos.getReleaseByTag({
...commonOptions,
tag: "nightly",
});
} catch (e) {
console.log("No previous nightly release");
// ignore, there was no previous nightly release
}
if (previousRelease !== undefined) {
// delete previous release and nightly tag
await github.rest.repos.deleteRelease({
...commonOptions,
release_id: previousRelease.data.id,
});
await github.rest.git.deleteRef({...commonOptions, ref: "tags/nightly"});
}
// create draft release
const newReleaseId = (await github.rest.repos.createRelease({
...commonOptions,
tag_name: "nightly",
target_commitish: "${{ github.sha }}",
name: "Nightly builds",
body: "Async-profiler binaries published automatically from the latest sources in `master` upon a successful build.",
prerelease: true,
tag_name: "v4.1",
target_commitish: "v4.x",
name: "New release",
draft: true,
})).data.id;
// upload binaries and jars to draft release
@@ -304,9 +284,3 @@ jobs:
data: await fs.readFile(archiveName),
});
}
// publish release
await github.rest.repos.updateRelease({
...commonOptions,
release_id: newReleaseId,
draft: false,
});