Revert UACPI Makefile vars to lazy expansion #44
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
| name: Build NullOS | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: rolling-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@v6 | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --no-install-recommends \ | |
| binutils \ | |
| build-essential \ | |
| cpio \ | |
| curl \ | |
| gzip \ | |
| tar \ | |
| xorriso \ | |
| xz-utils \ | |
| zstd | |
| - name: Build ISO | |
| run: make iso | |
| - name: Name ISO | |
| id: build | |
| run: | | |
| short_sha="${GITHUB_SHA::7}" | |
| iso_name="nullos-${short_sha}.iso" | |
| cp iso/nullos.iso "$iso_name" | |
| echo "short_sha=$short_sha" >> "$GITHUB_OUTPUT" | |
| echo "iso_name=$iso_name" >> "$GITHUB_OUTPUT" | |
| - name: Upload commit artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| path: ${{ steps.build.outputs.iso_name }} | |
| archive: false | |
| retention-days: 14 | |
| - name: Update rolling release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| ISO_NAME: ${{ steps.build.outputs.iso_name }} | |
| SHORT_SHA: ${{ steps.build.outputs.short_sha }} | |
| run: | | |
| release_tag="rolling" | |
| if gh release view "$release_tag" >/dev/null 2>&1; then | |
| gh release delete "$release_tag" --yes --cleanup-tag | |
| elif git ls-remote --exit-code --tags origin refs/tags/"$release_tag" >/dev/null 2>&1; then | |
| git push --delete origin "$release_tag" | |
| fi | |
| git tag --force "$release_tag" "$GITHUB_SHA" | |
| git push --force origin "refs/tags/$release_tag" | |
| notes="Automated NullOS build for commit [$GITHUB_SHA]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commit/$GITHUB_SHA)." | |
| gh release create "$release_tag" "$ISO_NAME" \ | |
| --title "NullOS ($SHORT_SHA)" \ | |
| --notes "$notes" \ | |
| --latest \ | |
| --verify-tag | |
| # Clean up any legacy rolling releases (rolling-YYYYMMDD-HHMMSS-SHA) | |
| while IFS= read -r old_tag; do | |
| if [ -n "$old_tag" ]; then | |
| gh release delete "$old_tag" --yes --cleanup-tag | |
| fi | |
| done < <( | |
| gh release list --limit 500 --json tagName --jq ' | |
| .[].tagName | select(startswith("rolling-")) | |
| ' | |
| ) |