mirror of
https://github.com/apple/pkl.git
synced 2026-04-17 22:19:46 +02:00
Switch to GitHub Actions (#1315)
This switches our builds over to GitHub Actions! TODO: * Add macOS/amd64 native-image builds; this isn't working right now * Patch musl with security patches * Add benchmark jobs over time As part of this build, PRBs will now only run `./gradlew check` on Linux, but other jobs can be run using slash commands, e.g. `[windows]` to run `./gradle check` on Windows.
This commit is contained in:
43
.github/jobs/GithubRelease.pkl
vendored
Normal file
43
.github/jobs/GithubRelease.pkl
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
module GithubRelease
|
||||
|
||||
extends "PklJob.pkl"
|
||||
|
||||
import "@gha/actions/Artifact.pkl"
|
||||
import "@gha/Context.pkl"
|
||||
|
||||
fixed job {
|
||||
`runs-on` = "ubuntu-latest"
|
||||
permissions {
|
||||
contents = "write"
|
||||
}
|
||||
needs = "deploy-release"
|
||||
steps {
|
||||
new Artifact.Download {
|
||||
with {
|
||||
pattern = "executable-**"
|
||||
}
|
||||
}
|
||||
new {
|
||||
name = "Publish release on GitHub"
|
||||
env {
|
||||
["GH_TOKEN"] = Context.github.token
|
||||
["TAG_NAME"] = Context.github.refName
|
||||
["GIT_SHA"] = Context.github.sha
|
||||
["GH_REPO"] = Context.github.repository
|
||||
}
|
||||
// language=bash
|
||||
run =
|
||||
#"""
|
||||
# exclude build_artifacts.txt from publish
|
||||
rm -f */build/executable/*.build_artifacts.txt
|
||||
find */build/executable/* -type d | xargs rm -rf
|
||||
gh release create ${TAG_NAME} \
|
||||
--title "${TAG_NAME}" \
|
||||
--target "${GIT_SHA}" \
|
||||
--verify-tag \
|
||||
--notes "Release notes: https://pkl-lang.org/main/current/release-notes/changelog.html#release-${TAG_NAME}" \
|
||||
*/build/executable/*
|
||||
"""#
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user