Skip to content

Add release workflow #22

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

Merged
merged 4 commits into from
May 23, 2025
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
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release

on:
workflow_dispatch:
inputs:
version:
description: 'New version (e.g. 0.4.0)'
required: true
type: string
branches:
- master

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: master

- name: Set version
id: set_version
run: |
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV

- name: Update version in Cargo.toml
run: |
sed -i "s/^version = \".*\"/version = \"${VERSION}\"/" Cargo.toml

- name: Commit and tag version bump
run: |
git config user.name "Andrei Avram"
git config user.email "6795248+andreiavrammsd@users.noreply.github.com"
git commit -am "Release v${VERSION}"
git tag "v${VERSION}"

- name: Push changes
run: |
git push origin master
git push origin "v${VERSION}"

- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.VERSION }}
name: v${{ env.VERSION }}
generate_release_notes: false
12 changes: 10 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,20 @@ overflow-checks = true
lto = false
panic = "unwind"
opt-level = 0
incremental = true

[profile.release]
codegen-units = 1
overflow-checks = true
lto = "thin"
debug = "full"
lto = true
panic = "abort"
opt-level = "z"
opt-level = "s"
split-debuginfo = "packed"
strip = "symbols"

[profile.bench]
lto = "thin"

[lints.rust]
unsafe_code = "allow"
Expand Down