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
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release
on:
push:
branches:
- main
- "v[0-9]+.[0-9]+"
tags:
- "v*"

env:
RUST_VERSION: 1.86

jobs:
crates:
name: Publish to crates.io
runs-on: ubuntu-latest
if: |
startsWith(github.ref, 'refs/tags/v') &&
github.repository_owner == 'fermyon'
steps:
- uses: actions/checkout@v2

- name: Install Rust toolchain
shell: bash
run: |
rustup toolchain install ${{ env.RUST_VERSION }}
rustup default ${{ env.RUST_VERSION }}

- name: Publish wasi-hyperium to crates.io
working-directory: ./
run: |
cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
25 changes: 25 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Cutting a new release of wasi-hyperium

To cut a new release, you will need to do the following:

1. Confirm that [CI is green](https://github.com/fermyon/wasi-hyperium/actions) for the commit selected to be tagged and released.

2. Change the workspace version number in [Cargo.toml](./Cargo.toml).

3. Create a pull request with these changes and merge once approved.

4. Checkout the commit with the version bump from above.

5. Create and push a new tag with a `v` and then the version number.

As an example, via the `git` CLI:

```
# Create a GPG-signed and annotated tag
git tag -s -m "wasi-hyperium v0.3.0" v0.3.0

# Push the tag to the remote corresponding to fermyon/wasi-hyperium (here 'origin')
git push origin v3.1.0
```

6. Pushing the tag upstream will trigger the [release action](https://github.com/fermyon/wasi-hyperium/actions/workflows/release.yml) which publishes the crates in this workspace to `crates.io`.