Skip to content

Commit

Permalink
feat: adds finish release action
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLeadbetter committed Feb 28, 2025
1 parent c2a40f3 commit b133595
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 10 deletions.
1 change: 0 additions & 1 deletion .github/scripts/files-with-current-version-string
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
README.md
midi2/Cargo.toml
midi2_proc/Cargo.toml

45 changes: 45 additions & 0 deletions .github/workflows/finish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Finish release

on:
workflow_dispatch:
inputs:
version:
description: Semver version to release
required: true
type:
description: What type of release
required: true
default: 'release'
type: choice
options:
- release
- hotfix

jobs:
release-finish:
name: Finish release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.type }}/${{ github.event.inputs.version }}
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
verbose: true
- name: Setup git-flow
run: ./.github/scripts/setup-git-flow.sh
- name: Finish release
run: git flow ${{ github.event.inputs.type }} finish ${{ github.event.inputs.version }} -m ${{ github.event.inputs.version }} --push
- name: Publish midi2_proc
uses: ryohidaka/[email protected]
with:
path: midi2_proc
token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Publish midi2
uses: ryohidaka/[email protected]
with:
path: midi2
token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ on:
type:
description: What type of release
required: true
default: release
default: 'release'
type: choice
options:
- release
- hotfix
Expand All @@ -23,16 +24,12 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
ref: ${{ github.ref }}
- name: Setup git-flow
run: ./.github/scripts/setup-git-flow.sh
- name: Start release
run: git flow ${{ github.event.inputs.type }} start ${{ github.event.inputs.version }}
- name: Determine last release
run: echo "LAST_RELEASE=$(./.github/scripts/last-released-version.sh)" >> $GITHUB_ENV
- name: Debug
run: cat ./.github/scripts/bump-version.sh
- name: Bump version
run: ./.github/scripts/bump-version.sh $LAST_RELEASE ${{ github.event.inputs.version }}
- name: Update changelog
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ You'll want to setup midi2 without default features to compile
without the `std` feature.

```toml
midi2 = { version = "0.8.0", default-features = false, features = ["channel-voice2", "sysex7"], }
midi2 = { version = "0.7.0", default-features = false, features = ["channel-voice2", "sysex7"], }
```

### Generic Representation
Expand Down
4 changes: 2 additions & 2 deletions midi2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "midi2"
version = "0.8.0"
version = "0.7.0"
description = "Ergonomic, versatile, strong types wrapping MIDI 2.0 message data."
edition = "2021"
readme = "README.md"
Expand All @@ -13,7 +13,7 @@ repository = "https://github.com/midi2-dev/bl-midi2-rs.git"
[dependencies]
derive_more = { version = "2.0.1", features = ["from"], default-features = false }
fixed = "1.28.0"
midi2_proc = { version = "0.8.0", path = "../midi2_proc" }
midi2_proc = { version = "0.7.0", path = "../midi2_proc" }
ux = "0.1.6"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion midi2_proc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "midi2_proc"
description = "Internal procedural macro crate. Only intended for use with midi2"
version = "0.8.0"
version = "0.7.0"
edition = "2021"
readme = "README.md"
license = "MIT OR Apache-2.0"
Expand Down

0 comments on commit b133595

Please sign in to comment.