v0.2.0: KERNEL_ABI_VERSION + CapabilitySet API parity with SDK v0.3.4 #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # AxonOS Kernel — Auto-release on tag push | |
| # | |
| # Triggers when a tag matching `v*.*.*` is pushed (e.g. v0.2.0). | |
| # Creates a GitHub Release with: | |
| # - Title: tag name (e.g. v0.2.0) | |
| # - Body: matching CHANGELOG section extracted automatically | |
| # - "Latest" green banner on the repo page for stable releases | |
| # - Pre-release marker for tags ending in `-rc`/`-beta`/`-alpha` | |
| # - Source `.tar.gz` and `.zip` archives attached as assets | |
| name: release | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| - 'v*.*.*-*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| name: Create GitHub Release | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Extract version from tag | |
| id: tag | |
| run: | | |
| VERSION="${GITHUB_REF#refs/tags/}" | |
| VERSION_NUMBER="${VERSION#v}" | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| echo "version_number=$VERSION_NUMBER" >> "$GITHUB_OUTPUT" | |
| if [[ "$VERSION" == *-* ]]; then | |
| echo "prerelease=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "prerelease=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Extract CHANGELOG section | |
| id: changelog | |
| run: | | |
| VERSION="${{ steps.tag.outputs.version }}" | |
| BODY="" | |
| if [ -f CHANGELOG.md ]; then | |
| BODY=$(awk -v ver="$VERSION" ' | |
| $0 ~ "^## \\[" ver "\\]" { capture=1; print; next } | |
| capture && /^## \[v[0-9]+\.[0-9]+\.[0-9]+\]/ { exit } | |
| capture { print } | |
| ' CHANGELOG.md) | |
| fi | |
| if [ -z "$BODY" ]; then | |
| BODY="Release $VERSION. See [CHANGELOG.md](./CHANGELOG.md) for details." | |
| fi | |
| { | |
| echo "body<<CHANGELOG_EOF" | |
| echo "$BODY" | |
| echo "" | |
| echo "---" | |
| echo "" | |
| echo "**ABI compatibility:** \`KERNEL_ABI_VERSION = 1\` (see [RFC-0006](https://github.com/AxonOS-org/axonos-rfcs))" | |
| echo "" | |
| echo "**Source archive:** see assets below." | |
| echo "**Full changelog:** [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/${{ steps.tag.outputs.version }}/CHANGELOG.md)" | |
| echo "CHANGELOG_EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Build source archives | |
| run: | | |
| VERSION="${{ steps.tag.outputs.version }}" | |
| ARCHIVE="axonos-kernel-${VERSION}.tar.gz" | |
| ZIP="axonos-kernel-${VERSION}.zip" | |
| git archive --format=tar.gz \ | |
| --prefix="axonos-kernel-${{ steps.tag.outputs.version_number }}/" \ | |
| -o "$ARCHIVE" \ | |
| "$VERSION" | |
| git archive --format=zip \ | |
| --prefix="axonos-kernel-${{ steps.tag.outputs.version_number }}/" \ | |
| -o "$ZIP" \ | |
| "$VERSION" | |
| ls -lh "$ARCHIVE" "$ZIP" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.tag.outputs.version }} | |
| name: ${{ steps.tag.outputs.version }} | |
| body: ${{ steps.changelog.outputs.body }} | |
| draft: false | |
| prerelease: ${{ steps.tag.outputs.prerelease }} | |
| make_latest: ${{ steps.tag.outputs.prerelease == 'false' && 'true' || 'false' }} | |
| files: | | |
| axonos-kernel-${{ steps.tag.outputs.version }}.tar.gz | |
| axonos-kernel-${{ steps.tag.outputs.version }}.zip | |
| fail_on_unmatched_files: true | |
| generate_release_notes: false |