From CI downloads to tagged releases
Two workflows share a project configuration for a source ZIP and checksum. Commit the example’s CHANGELOG.md, keep the .github/ directory structure and replace XOVA_ACTIONS_SHA with the full SHA of a commit that passed CI in xova-dev/actions.
Project configuration
The example uses Git, unzip and sha256sum. Set your own checks, build command and asset list for APKs or other files.
{
"schemaVersion": 1,
"setup": { "install-command": ":" },
"code": { "check-command": "git show --check --oneline HEAD" },
"artifact": {
"kind": "release-assets",
"check-command": "git ls-files --error-unmatch CHANGELOG.md",
"build-command": "mkdir -p dist && git archive --format=zip -o dist/source.zip HEAD && cd dist && unzip -tq source.zip && sha256sum source.zip > source.zip.sha256",
"output-directory": "dist"
},
"github-release": { "assets": ["source.zip", "source.zip.sha256"] }
}
Daily CI
Pull requests, pushes to main and nightly runs use the same checks. The build waits for them to pass. Download the Actions artifact and open payload/ to test it. For checks alone, omit the build job.
name: CI
on:
pull_request:
push:
branches: [main]
schedule:
- cron: '15 2 * * *'
permissions:
contents: read
jobs:
check:
uses: xova-dev/actions/.github/workflows/check.yml@XOVA_ACTIONS_SHA
build:
needs: check
uses: xova-dev/actions/.github/workflows/check.yml@XOVA_ACTIONS_SHA
with:
task: artifact
source-sha: ${{ needs.check.outputs.source-sha }}
Tag publication
Reuse full CI at the tag SHA or run the full check on a miss. Rebuild with the same configuration and publish the files by their same-run artifact ID. For notes alone, set "github-release": {}, make publish depend on verify and pass its SHA. Omit build and the attachment ID.
name: Publish
on:
push:
tags: ['v*']
permissions:
contents: read
jobs:
verify:
uses: xova-dev/actions/.github/workflows/check-ci.yml@XOVA_ACTIONS_SHA
permissions:
contents: read
actions: read
with:
run-check-on-miss: true
build:
needs: verify
uses: xova-dev/actions/.github/workflows/check.yml@XOVA_ACTIONS_SHA
with:
task: artifact
source-sha: ${{ needs.verify.outputs.source-sha }}
publish:
needs: build
uses: xova-dev/actions/.github/workflows/publish.yml@XOVA_ACTIONS_SHA
permissions:
contents: write
id-token: write
with:
expected-sha: ${{ needs.build.outputs.source-sha }}
release-artifact-id: ${{ needs.build.outputs.artifact-id }}
For optional delivery, see npm publication and standalone or stable-release deployment.