Each release process is broken down per language target:
Swift packages have additional required edits after the release is cut:
- Cut the release on github.
- run
make_swift.sh
. confirm that allcargo build
invocations are run with the--release
flag - build a zip archive of
Iroh.xcframework
:zip -r IrohLib.xcframework.zip Iroh.xcframework/*
- Compute the checksum for the zip archive:
swift package compute-checksum MyLibrary.xcframework.zip
- Upload the resulting zip archive as a release artifact. Copy the URL to the release.
- edit the root
Package.swift
, settingtargets[1](path:, checksum:)
:
// swift-tools-version:5.8
import PackageDescription
let package = Package(
name: "IrohLib",
platforms: [
.iOS(.v15)
],
products: [
.library(
name: "IrohLib",
targets: ["IrohLib", "Iroh"]),
],
dependencies: [],
targets: [
.target(
name: "IrohLib",
dependencies: [
.byName(name: "Iroh")
]),
.binaryTarget(
name: "Iroh",
// SET THIS:
path: "https://github.com/n0-computer/iroh-ffi/releases/download/v0.0.6/IrohLib.xcframework.zip"),
// AND THIS:
checksum: "4e612297d935332562ed8038ab6a66bde32dd644daf5f4d4f64e24f3bdf961e8",
]
)
- Commit the result & push
The first time:
- Create an account on pypi & testpipy
- Get invited to the
iroh
project - Install
twine
- Upgrade
pkginfo
to at least1.10
. For more information check out this issue on twine - Create an API token on pipy and test pipy
- Put those tokens into ~/.pypirc:
# ~/.pypirc
[pypi]
username = __token__
password = pypi-TOKEN
[testpypi]
username = __token__
password = pypi-TOKEN
To release iroh python:
- Download the artifacts from the wheels ci workflow, picking the workflow that was run on the latest
main
branch - Extract the artifacts
- Upload each to testpypi:
twine upload --repository testpypi iroh-$VERSION-*.whl
- Dogfood by downloading the latest iroh version from testpipy and using it. The simplest test may be to run the python code in the
iroh-ffi/python
directory.- create & activate a new virtual env
- install iroh from testpypi
pip install -i https://test.pypi.org/simple/ iroh
- run
python main.py
- ensure it works (and remove the test env)
- Upload each to pypi:
twine upload iroh-$VERSION-*.whl