mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
45 lines
1.1 KiB
Plaintext
45 lines
1.1 KiB
Plaintext
module GithubRelease
|
|
|
|
extends "PklJob.pkl"
|
|
|
|
import "@gha/catalog.pkl"
|
|
import "@gha/context.pkl"
|
|
|
|
fixed job {
|
|
`runs-on` = "ubuntu-latest"
|
|
permissions {
|
|
contents = "write"
|
|
}
|
|
needs = "deploy-release"
|
|
steps {
|
|
(catalog.`actions/download-artifact@v6`) {
|
|
with {
|
|
pattern = "executable-**"
|
|
`merge-multiple` = true
|
|
}
|
|
}
|
|
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/*
|
|
"""#
|
|
}
|
|
}
|
|
}
|