Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ jobs:
- name: Host unit-test gate
run: cargo xtask host-test

- name: Crates.io publication plan
run: packaging/test-publish-crates.sh

- name: Crates.io package preflight
run: |
version="$(cargo metadata --no-deps --format-version 1 |
jq -r '.packages[] | select(.name == "cargo-narf") | .version')"
packaging/publish-crates.sh --version "$version" --check

clippy-kernel:
name: clippy-kernel / ${{ matrix.arch }}
needs: changes
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
test "$(gh api "repos/$GITHUB_REPOSITORY/git/tags/$tag_sha" --jq .verification.verified)" = true
version="${RELEASE_TAG#v}"
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+([.-][0-9A-Za-z][0-9A-Za-z.-]*)?$ ]]
packaging/publish-crates.sh --version "$version" --plan >/dev/null
echo "version=$version" >> "$GITHUB_OUTPUT"

packages:
Expand Down Expand Up @@ -124,9 +125,24 @@ jobs:
target/narf-aarch64-uefi.img
target/narf-aarch64-uefi.img.sha256

publish:
crates:
needs: [validate, packages, iso-test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref_name }}
fetch-depth: 0
- run: rustup show active-toolchain || rustup toolchain install
- env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
NARF_RELEASE_TAG_VERIFIED: "1"
VERSION: ${{ needs.validate.outputs.version }}
run: packaging/publish-crates.sh --version "$VERSION" --execute

publish:
needs: [validate, packages, iso-test, crates]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
Expand Down
Loading
Loading