Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: release #13

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
204 changes: 17 additions & 187 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,197 +1,27 @@
name: Release-plz

permissions:
pull-requests: write
contents: write

on:
push:
branches:
- main

name: 'Perform a release'

jobs:
# NOTE: This step is stateful. When there are unreleased changes on main, it
# generates a candidate PR for the next release based on all the unreleased
# changes and their implications for the versions of our packages. If such a
# PR already exists, it will detect it and update in place. These PRs are
# intended to stick around and update until a release is ready to be made.
# Once merged, this step will detect the merge and generate Git tags and
# corresponding Github releases for each package being released. Only at that
# time will the rest of the steps in this workflow run.
release-please:
name: 'Prepare a release'
release-plz:
name: Release-plz
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.repository_owner == 'subconsciousnetwork'
outputs:
noosphere_cli_released: ${{ steps.release.outputs['rust/noosphere-cli--release_created'] }}
noosphere_cli_release_tag_name: ${{ steps.release.outputs['rust/noosphere-cli--tag_name'] }}
noosphere_released: ${{ steps.release.outputs['rust/noosphere--release_created'] }}
noosphere_release_tag_name: ${{ steps.release.outputs['rust/noosphere--tag_name'] }}
anything_was_released:
${{ steps.release.outputs['rust/noosphere--release_created'] ||
steps.release.outputs['rust/noosphere-api--release_created'] ||
steps.release.outputs['rust/noosphere-cli--release_created'] ||
steps.release.outputs['rust/noosphere-collections--release_created'] ||
steps.release.outputs['rust/noosphere-core--release_created'] ||
steps.release.outputs['rust/noosphere-gateway--release_created'] ||
steps.release.outputs['rust/noosphere-ipfs--release_created'] ||
steps.release.outputs['rust/noosphere-into--release_created'] ||
steps.release.outputs['rust/noosphere-ns--release_created'] ||
steps.release.outputs['rust/noosphere-sphere--release_created'] ||
steps.release.outputs['rust/noosphere-storage--release_created'] }}
steps:
- uses: chainguard-dev/actions/setup-gitsign@main
- name: 'Run release-please'
id: release
uses: cdata/release-please-action@fix/support-cargo-workspace-dependency-inheritance
with:
token: ${{ secrets.GITHUB_TOKEN }}
default-branch: main
command: manifest
release-type: rust
extra-files: |
Cargo.toml

noosphere-cli-build:
needs: ['release-please']
if: ${{ needs['release-please'].outputs.noosphere_cli_released }}
uses: ./.github/workflows/noosphere_cli_build.yaml

noosphere-cli-release-artifacts:
name: 'Add Noosphere CLI artifacts to release'
needs: ['release-please', 'noosphere-cli-build']
runs-on: ubuntu-latest
steps:
- name: 'Download build artifacts'
uses: actions/download-artifact@v3

- name: 'Generate checksums'
run: for file in orb-*/orb-*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done

# NOTE: The release has to be published before adding build artifacts,
# otherwise the upload causes a different release to be made (???)
- name: 'Publish release'
run: gh release edit ${{ needs['release-please'].outputs.noosphere_cli_release_tag_name }} --draft=false --repo=subconsciousnetwork/noosphere
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: MarcoIeni/release-plz-action@v0.5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'Add build artifacts to release'
uses: softprops/action-gh-release@v1
with:
files: orb-*/orb-*
tag_name: ${{ needs['release-please'].outputs.noosphere_cli_release_tag_name }}

build-container-images:
name: 'Build container images for release'
needs: ['release-please']
if: ${{ needs['release-please'].outputs.noosphere_released }}
uses: ./.github/workflows/container_images.yaml
secrets: inherit
with:
image-tag: ${{ needs['release-please'].outputs.noosphere_release_tag_name }}

noosphere-apple-build:
name: 'Build Noosphere artifacts (Apple)'
needs: ['release-please']
if: ${{ needs['release-please'].outputs.noosphere_released }}
uses: ./.github/workflows/noosphere_apple_build.yaml

noosphere-release-artifacts:
name: 'Add Noosphere artifacts to release'
needs: ['release-please', 'noosphere-apple-build']
runs-on: ubuntu-latest
steps:
- name: 'Download XCode Framework artifact'
uses: actions/download-artifact@v3
with:
name: libnoosphere_apple_framework

- name: 'Generate checksum'
run: openssl dgst -sha256 ./libnoosphere-apple-xcframework.zip > ./libnoosphere-apple-xcframework.zip.sha256

# NOTE: The release has to be published before adding build artifacts,
# otherwise the upload causes a different release to be made (???)
- name: 'Publish release'
run: gh release edit ${{ needs['release-please'].outputs.noosphere_release_tag_name }} --draft=false --repo=subconsciousnetwork/noosphere
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'Add build artifacts to release'
uses: softprops/action-gh-release@v1
with:
files: |
libnoosphere-apple-xcframework.zip
libnoosphere-apple-xcframework.zip.sha256
tag_name: ${{ needs['release-please'].outputs.noosphere_release_tag_name }}

update-swift-noosphere-binary-target:
name: 'Update SwiftNoosphere binary target'
needs: ['release-please', 'noosphere-release-artifacts']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PUSH_TOKEN }}
- name: 'Download XCode Framework artifact'
uses: actions/download-artifact@v3
with:
name: libnoosphere_apple_framework

- name: 'Generate checksum'
id: generate-checksum
run: |
CHECKSUM=`openssl dgst -r -sha256 ./libnoosphere-apple-xcframework.zip | cut -d " " -f 1`
echo "checksum=$CHECKSUM" >> $GITHUB_OUTPUT
- name: 'Modify Package.swift'
run: |
URL="https://github.com/subconsciousnetwork/noosphere/releases/download/${{ needs.release-please.outputs.noosphere_release_tag_name }}/libnoosphere-apple-xcframework.zip"

sed -i -e "s#url: \"[^\"]*\",#url: \"$URL\",#" ./Package.swift
sed -i -e "s#checksum: \"[^\"]*\"),#checksum: \"${{ steps.generate-checksum.outputs.checksum }}\"),#" ./Package.swift
- uses: actions/upload-artifact@v3
with:
name: swift-package-manifest
path: ./Package.swift
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: 'Commit and tag Package.swift for latest release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NOOSPHERE_VERSION: ${{ needs.release-please.outputs.noosphere_release_tag_name }}
run: |
# Turn off history expansion so that Bash doesn't freak out about $MESSAGE contents
# https://stackoverflow.com/a/11816138
set +H

git config --global user.name 'Subconscious Ops'
git config --global user.email 'github-ops@subconscious.network'

git commit -S -am "feat!: Update Swift Package Noosphere dependency to $NOOSPHERE_VERSION"
git tag "swift-$NOOSPHERE_VERSION"
git push --tags origin main

# Publishes crates to crates.io in dependency order. This command is
# idempotent and won't re-publish crates that are already published, so it's
# safe for us to run it indiscriminately
publish-crates:
name: 'Publish to crates.io'
needs: ['release-please']
runs-on: ubuntu-latest
if: ${{ needs['release-please'].outputs.anything_was_released }}
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: 'Setup Rust'
run: |
curl -sSf https://sh.rustup.rs | sh -s -- -y
- name: 'Install environment packages'
run: |
sudo apt-get update -qqy
sudo apt-get install protobuf-compiler cmake libssl-dev pkg-config
- name: 'Install cargo-workspaces'
run: cargo install --force cargo-workspaces
- name: 'Publish crates'
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
run: cargo workspaces publish --from-git --allow-dirty
CARGO_REGISTRY_TOKEN: "faketoken"
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 79 additions & 0 deletions rust/noosphere-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,85 @@
* noosphere-core bumped from 0.1.0-alpha.1 to 0.1.0
* noosphere-storage bumped from 0.1.0-alpha.1 to 0.1.0

## [0.13.0](https://github.com/cdata/noosphere/compare/noosphere-api-v0.12.2...noosphere-api-v0.13.0) - 2023-09-19

### Added
- `orb sphere history` and `orb sphere render` ([#576](https://github.com/cdata/noosphere/pull/576))
- [**breaking**] `orb` uses latest Noosphere capabilities ([#530](https://github.com/cdata/noosphere/pull/530))
- [**breaking**] C FFI to verify authorizations ([#510](https://github.com/cdata/noosphere/pull/510))
- [**breaking**] Replace `noosphere-car` with `iroh-car` throughout the Noosphere crates. ([#492](https://github.com/cdata/noosphere/pull/492))
- [**breaking**] Authorize and revoke APIs ([#420](https://github.com/cdata/noosphere/pull/420))
- [**breaking**] Update to `rs-ucan` 0.4.0, implementing UCAN 0.10ish. ([#449](https://github.com/cdata/noosphere/pull/449))
- Consolidate `NsRecord` implementation in`LinkRecord`. Fixes [#395](https://github.com/cdata/noosphere/pull/395) ([#399](https://github.com/cdata/noosphere/pull/399))
- Enable expired yet valid records in the name system. Update to ucan 0.2.0. ([#360](https://github.com/cdata/noosphere/pull/360))
- Update IPLD-related dependencies ([#327](https://github.com/cdata/noosphere/pull/327))
- [**breaking**] Traverse the Noosphere vast ([#284](https://github.com/cdata/noosphere/pull/284))
- [**breaking**] Petname resolution and synchronization in spheres and gateways ([#253](https://github.com/cdata/noosphere/pull/253))
- Refactor storage interfaces ([#178](https://github.com/cdata/noosphere/pull/178))
- Syndicate sphere revisions to IPFS Kubo ([#177](https://github.com/cdata/noosphere/pull/177))
- Re-implement `noosphere-cli` in terms of `noosphere` ([#162](https://github.com/cdata/noosphere/pull/162))
- `SphereFs` is initialized with key material ([#140](https://github.com/cdata/noosphere/pull/140))
- Add `noosphere` crate-based Swift package ([#131](https://github.com/cdata/noosphere/pull/131))

### Fixed
- [**breaking**] Enable incremental sphere replication ([#409](https://github.com/cdata/noosphere/pull/409))
- *(api)* Use rustls instead of OpenSSL

### Other
- release main ([#614](https://github.com/cdata/noosphere/pull/614))
- Clean up redundant dependencies, replace lingering async-std usage with tokio, promote tokio to workspace dependency. ([#590](https://github.com/cdata/noosphere/pull/590))
- release main ([#581](https://github.com/cdata/noosphere/pull/581))
- release main ([#537](https://github.com/cdata/noosphere/pull/537))
- promote url crate to workspace dependency. ([#546](https://github.com/cdata/noosphere/pull/546))
- release main ([#517](https://github.com/cdata/noosphere/pull/517))
- release main ([#488](https://github.com/cdata/noosphere/pull/488))
- release main ([#458](https://github.com/cdata/noosphere/pull/458))
- release main ([#453](https://github.com/cdata/noosphere/pull/453))
- release main ([#443](https://github.com/cdata/noosphere/pull/443))
- release main ([#418](https://github.com/cdata/noosphere/pull/418))
- release main ([#413](https://github.com/cdata/noosphere/pull/413))
- release main ([#405](https://github.com/cdata/noosphere/pull/405))
- Remove unused dependencies, and update/replace dependencies with existing security advisories. Fixes [#62](https://github.com/cdata/noosphere/pull/62). ([#404](https://github.com/cdata/noosphere/pull/404))
- release main ([#370](https://github.com/cdata/noosphere/pull/370))
- release main ([#363](https://github.com/cdata/noosphere/pull/363))
- release main ([#359](https://github.com/cdata/noosphere/pull/359))
- release main ([#349](https://github.com/cdata/noosphere/pull/349))
- release main ([#336](https://github.com/cdata/noosphere/pull/336))
- Add cargo fmt/clippy tests in Linux CI. Fixes [#94](https://github.com/cdata/noosphere/pull/94). ([#341](https://github.com/cdata/noosphere/pull/341))
- release main ([#328](https://github.com/cdata/noosphere/pull/328))
- release main ([#323](https://github.com/cdata/noosphere/pull/323))
- Iterative updates to NameSystem/DHT ([#308](https://github.com/cdata/noosphere/pull/308))
- release main ([#301](https://github.com/cdata/noosphere/pull/301))
- release main ([#295](https://github.com/cdata/noosphere/pull/295))
- Revise default logging ([#299](https://github.com/cdata/noosphere/pull/299))
- release main ([#279](https://github.com/cdata/noosphere/pull/279))
- release main ([#236](https://github.com/cdata/noosphere/pull/236))
- release main ([#227](https://github.com/cdata/noosphere/pull/227))
- release main ([#220](https://github.com/cdata/noosphere/pull/220))
- release main ([#217](https://github.com/cdata/noosphere/pull/217))
- release main ([#205](https://github.com/cdata/noosphere/pull/205))
- release main ([#198](https://github.com/cdata/noosphere/pull/198))
- release main ([#183](https://github.com/cdata/noosphere/pull/183))
- release main ([#181](https://github.com/cdata/noosphere/pull/181))
- Update IPLD-adjacent dependencies ([#180](https://github.com/cdata/noosphere/pull/180))
- release main ([#157](https://github.com/cdata/noosphere/pull/157))
- release main ([#137](https://github.com/cdata/noosphere/pull/137))
- release main ([#136](https://github.com/cdata/noosphere/pull/136))
- release main ([#125](https://github.com/cdata/noosphere/pull/125))
- release main ([#121](https://github.com/cdata/noosphere/pull/121))
- Add versions to workspace crate dependencies
- Add descriptions to Cargo manifests
- Add crate READMEs and Cargo.toml metadata ([#114](https://github.com/cdata/noosphere/pull/114))
- rename `noosphere` to `noosphere-core` ([#112](https://github.com/cdata/noosphere/pull/112))
- Use pre-release versioning for crates
- Implement `orb sync` subcommand ([#107](https://github.com/cdata/noosphere/pull/107))
- Clean up build / runtime warnings ([#95](https://github.com/cdata/noosphere/pull/95))
- Implement `orb config` and `orb serve` subcommands ([#92](https://github.com/cdata/noosphere/pull/92))
- Introduce `noosphere-cli` crate ([#71](https://github.com/cdata/noosphere/pull/71))
- Introduce FS-like view into sphere data ([#44](https://github.com/cdata/noosphere/pull/44))
- Features/sync existing sphere ([#22](https://github.com/cdata/noosphere/pull/22))
- noosphere-api

## [0.1.0](https://github.com/subconsciousnetwork/noosphere/compare/noosphere-api-v0.1.0-alpha.1...noosphere-api-v0.1.0) (2022-11-03)


Expand Down
Loading