76 lines
2.1 KiB
YAML
76 lines
2.1 KiB
YAML
name: Release Dry Run
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
- feature/create-addon-port
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
release-dry-run:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Java
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: "21"
|
|
|
|
- name: Inspect release metadata
|
|
shell: bash
|
|
run: |
|
|
missing=0
|
|
|
|
required_docs=(
|
|
"README.md"
|
|
"CHANGELOG.md"
|
|
"SECURITY.md"
|
|
"docs/release-checklist.md"
|
|
"docs/security-review.md"
|
|
)
|
|
|
|
for file in "${required_docs[@]}"; do
|
|
if [ ! -f "$file" ]; then
|
|
echo "Missing release document: $file"
|
|
missing=1
|
|
fi
|
|
done
|
|
|
|
placeholder_paths=(README.md AGENTS.md .codex docs)
|
|
placeholder_pattern='PROJECT_NAME|PROJECT_DESCRIPTION|REPOSITORY_OWNER|REPOSITORY_NAME|PACKAGE_NAME|ARTIFACT_NAME|ARTIFACT_OUTPUT_DIRECTORY|DOWNLOAD_URL|BUILD_COMMAND|TEST_COMMAND|LINT_COMMAND|AUDIT_COMMAND|README_COMMAND|INSTALL_COMMAND|DEV_COMMAND|PACKAGE_MANAGER|PROJECT_VERSION'
|
|
|
|
for path in "${placeholder_paths[@]}"; do
|
|
[ -e "$path" ] || continue
|
|
if grep -RInE --exclude-dir=.git "$placeholder_pattern" "$path"; then
|
|
echo "Unresolved template placeholders found."
|
|
missing=1
|
|
fi
|
|
done
|
|
|
|
if [ "$missing" -eq 1 ]; then
|
|
exit 1
|
|
fi
|
|
|
|
- name: Build release candidate
|
|
working-directory: create-limited-draining
|
|
run: ./gradlew build --no-daemon
|
|
|
|
- name: Artifact report
|
|
shell: bash
|
|
run: |
|
|
echo "Potential release artifacts:"
|
|
find create-limited-draining/build/libs -maxdepth 1 -type f -name '*.jar' -print | head -200
|
|
|
|
cat <<'EOF'
|
|
|
|
Release dry run completed.
|
|
|
|
This workflow verifies release readiness. It does not create tags,
|
|
releases, packages, or upload artifacts.
|
|
EOF
|