diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..caeb144 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/Cargo.toml b/Cargo.toml index b9484c0..39b6c5a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"