Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
swift:
name: Swift docs (DocC)
timeout-minutes: 45
runs-on: [self-hosted, macOS, ARM64]
runs-on: [self-hosted, macOS, ARM64, xcode16]
steps:
- uses: actions/checkout@v5
with:
Expand Down
49 changes: 20 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
# The Swift xcframework zip is built upstream by release_swift.yml on the
# `release/v*` PR branch and uploaded to a draft GitHub release. This
# workflow's create-release job promotes that draft to published; the other
# jobs then `gh release upload` the rest of the assets to the same release.
# Single Swift build (in PR CI), no cross-host determinism requirement.
# jobs then attach the rest of the assets to the same release via
# softprops/action-gh-release. Single Swift build (in PR CI), no
# cross-host determinism requirement.

name: release
on:
Expand All @@ -17,8 +18,8 @@ env:
PACKAGE_NAME: libiroh
IROH_FORCE_STAGING_RELAYS: "1"

# `gh release upload` + `gh release edit --draft=false` both need write
# access to the release.
# softprops/action-gh-release edits the release + uploads assets under
# GITHUB_TOKEN; needs write on contents.
permissions:
contents: write

Expand All @@ -27,7 +28,7 @@ jobs:
# the Swift xcframework zip already attached and the SHA already baked into
# Package.swift on main. Tag time, this job just promotes the draft to
# published (or creates fresh if no draft, e.g. a manual tag without a PR).
# Other jobs then `gh release upload` the rest of the assets.
# Other jobs then attach the rest of the assets to the same release.
create-release:
name: create-release
runs-on: ubuntu-latest
Expand All @@ -42,26 +43,12 @@ jobs:
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "version is: ${GITHUB_REF#refs/tags/}"
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 1
- name: Promote draft release (or create fresh)
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ env.RELEASE_VERSION }}
shell: bash
run: |
set -eu
if gh release view "$TAG" --json isDraft -q .isDraft 2>/dev/null | grep -q true; then
echo "Promoting existing draft $TAG to published"
gh release edit "$TAG" --draft=false
elif ! gh release view "$TAG" >/dev/null 2>&1; then
echo "Creating fresh published release $TAG (no draft from release_swift.yml)"
gh release create "$TAG" --title "$TAG" --notes ""
else
echo "Release $TAG already published"
fi
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ env.RELEASE_VERSION }}
name: ${{ env.RELEASE_VERSION }}
draft: false

build-and-publish-libs:
name: Build & publish release libraries
Expand Down Expand Up @@ -131,11 +118,11 @@ jobs:
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
fi
- name: Upload release archive
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ needs.create-release.outputs.release_version }}
shell: bash
run: gh release upload "$TAG" "$ASSET" --clobber
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ needs.create-release.outputs.release_version }}
files: ${{ env.ASSET }}
fail_on_unmatched_files: true

# build-and-publish-swift was here. The Swift xcframework now ships from
# release_swift.yml on the release/v* PR branch (it's already attached to
Expand Down Expand Up @@ -204,6 +191,10 @@ jobs:
with:
targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "17"
- uses: android-actions/setup-android@v3
- name: Setup Android NDK
uses: arqu/setup-ndk@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
V=$(grep -oE 'let releaseTag = "v[^"]+"' Package.swift | sed -E 's/.*"(v[^"]+)"/\1/')
echo "tag=$V" >> "$GITHUB_OUTPUT"
- name: Upload zip to draft GitHub release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v3
with:
draft: true
tag_name: ${{ steps.release_tag.outputs.tag }}
Expand Down
Loading