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
60 changes: 56 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,46 @@ on:
tags:
- 'v*'
workflow_dispatch:
inputs:
version:
description: 'Version to release (e.g., 0.2.0)'
required: true
type: string
prerelease:
description: 'Mark as pre-release'
required: false
type: boolean
default: false

permissions:
contents: write

jobs:
create-tag:
name: Create Release Tag
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
outputs:
tag: ${{ steps.create_tag.outputs.tag }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Create and push tag
id: create_tag
run: |
TAG="v${{ github.event.inputs.version }}"
echo "tag=$TAG" >> $GITHUB_OUTPUT
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a "$TAG" -m "Release version ${{ github.event.inputs.version }}"
git push origin "$TAG"

test:
name: Run tests
runs-on: ubuntu-latest
needs: [create-tag]
if: always() && (needs.create-tag.result == 'success' || needs.create-tag.result == 'skipped')
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -234,29 +266,49 @@ jobs:
create-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: [build-linux, build-macos, build-macos-arm, build-windows]
if: startsWith(github.ref, 'refs/tags/')
needs: [create-tag, build-linux, build-macos, build-macos-arm, build-windows]
if: always() && (needs.build-linux.result == 'success' && needs.build-macos.result == 'success' && needs.build-macos-arm.result == 'success' && needs.build-windows.result == 'success')
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Determine tag and prerelease status
id: release_info
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
TAG="v${{ github.event.inputs.version }}"
PRERELEASE="${{ github.event.inputs.prerelease }}"
else
TAG="${{ github.ref_name }}"
if [[ "$TAG" =~ -rc|-beta|-alpha ]]; then
PRERELEASE="true"
else
PRERELEASE="false"
fi
fi
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "prerelease=$PRERELEASE" >> $GITHUB_OUTPUT

- name: Create release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.release_info.outputs.tag }}
draft: false
prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-beta') || contains(github.ref, '-alpha') }}
prerelease: ${{ steps.release_info.outputs.prerelease }}
files: |
artifacts/rustalk-linux-x86_64/rustalk-linux-x86_64.tar.gz
artifacts/rustalk-macos-x86_64/rustalk-macos-x86_64.tar.gz
artifacts/rustalk-macos-arm64/rustalk-macos-arm64.tar.gz
artifacts/rustalk-windows-x86_64/rustalk-windows-x86_64.zip
body: |
## RusTalk Release ${{ github.ref_name }}
## RusTalk Release ${{ steps.release_info.outputs.tag }}

High-performance SIP B2BUA / PBX / MS-Teams-compatible SBC built in Rust.

Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.1.0"
version = "0.2.0"
edition = "2021"
authors = ["RusTalk Contributors"]
license = "MIT"
Expand Down
83 changes: 63 additions & 20 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,72 @@ The workflow automatically determines the release type based on the tag:

## Creating a Release

### 1. Prepare the Release
### Method 1: Manual Trigger via GitHub UI (Recommended)

This method allows you to create a release without needing to checkout the repository locally.

#### 1. Prepare the Release

Ensure the version is updated in a PR:

- Update version in `Cargo.toml`
- Update `Cargo.lock` with `cargo update -p rustalk-core -p rustalk-edge -p rustalk-cloud -p rustalk-cli`
- All tests pass: `cargo test --workspace`
- Code is properly formatted: `cargo fmt --all`
- Clippy checks are addressed: `cargo clippy --workspace`

#### 2. Merge the PR

Merge the version bump PR to the main branch.

#### 3. Trigger Release Workflow

1. Go to the [Actions tab](https://github.com/halcycon/RusTalk/actions)
2. Select the "Release" workflow from the left sidebar
3. Click "Run workflow" button
4. Enter the version number (e.g., `0.2.0` - without the 'v' prefix)
5. Optionally check "Mark as pre-release" for release candidates, betas, or alphas
6. Click "Run workflow"

The workflow will automatically:
- Create and push the git tag (e.g., `v0.2.0`)
- Run tests on all platforms
- Build release binaries
- Create GitHub release with all artifacts

#### 4. Monitor the Build

1. The workflow run will appear in the [Actions tab](https://github.com/halcycon/RusTalk/actions)
2. Watch the progress through each job:
- Create Release Tag (for manual triggers)
- Run tests
- Build for Linux, macOS (x86_64 and ARM64), and Windows
- Create GitHub Release

The entire process typically takes 15-30 minutes.

#### 5. Verify the Release

1. Go to the [Releases page](https://github.com/halcycon/RusTalk/releases)
2. Check that the new release appears with all platform archives
3. Download and test one or more archives to verify they work

---

### Method 2: Manual Tag Push (Traditional)

This method requires local repository access.

#### 1. Prepare the Release

Before creating a release, ensure:

- All tests pass: `cargo test --workspace`
- Code is properly formatted: `cargo fmt --all`
- Clippy checks are addressed: `cargo clippy --workspace`
- Documentation is up to date
- CHANGELOG is updated (if you maintain one)

### 2. Update Version Numbers
#### 2. Update Version Numbers

Update the version in `Cargo.toml`:

Expand All @@ -47,15 +102,15 @@ Then update the lock file:
cargo update -p rustalk-core -p rustalk-edge -p rustalk-cloud -p rustalk-cli
```

### 3. Commit Version Update
#### 3. Commit Version Update

```bash
git add Cargo.toml Cargo.lock
git commit -m "Bump version to 0.2.0"
git push origin main
```

### 4. Create and Push the Tag
#### 4. Create and Push the Tag

```bash
# Create an annotated tag
Expand All @@ -65,23 +120,11 @@ git tag -a v0.2.0 -m "Release version 0.2.0"
git push origin v0.2.0
```

### 5. Monitor the Build

1. Go to the [Actions tab](https://github.com/halcycon/RusTalk/actions) on GitHub
2. Watch the "Release" workflow run
3. The workflow will:
- Run tests on all platforms
- Build release binaries for each platform
- Create release archives
- Publish a GitHub release with all artifacts

The entire process typically takes 15-30 minutes.
#### 5. Monitor and Verify

### 6. Verify the Release
Follow steps 4-5 from Method 1 above to monitor the build and verify the release.

1. Go to the [Releases page](https://github.com/halcycon/RusTalk/releases)
2. Check that the new release appears with all platform archives
3. Download and test one or more archives to verify they work
---

## Manual Release (if needed)

Expand Down
Loading
Loading