-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from SiaFoundation/nate/knope
Automate releases
- Loading branch information
Showing
4 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
sia_sdk: patch | ||
--- | ||
|
||
# v2 signing implemented |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Prepare Release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
jobs: | ||
prepare-release: | ||
if: "!contains(github.event.head_commit.message, 'chore: prepare releases')" # Skip merges from releases | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Environment | ||
run: | | ||
rustup update stable | ||
cargo install knope | ||
- run: knope prepare-release --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Release | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: [main] | ||
|
||
jobs: | ||
release: | ||
if: github.head_ref == 'release' && github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Environment | ||
run: | | ||
rustup update stable | ||
cargo install knope | ||
- name: Release | ||
run: | | ||
knope release | ||
cargo publish -p sia_sdk_derive | ||
cargo publish -p sia_sdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[packages.sia_sdk] | ||
versioned_files = ["sia/Cargo.toml"] | ||
changelog = "sia/CHANGELOG.md" | ||
|
||
[packages.sia_sdk_derive] | ||
versioned_files = ["sia_derive/Cargo.toml"] | ||
changelog = "sia_derive/CHANGELOG.md" | ||
|
||
[[workflows]] | ||
name = "prepare-release" | ||
|
||
[[workflows.steps]] | ||
type = "Command" | ||
command = "git switch -c release" | ||
|
||
[[workflows.steps]] | ||
type = "PrepareRelease" | ||
|
||
[[workflows.steps]] | ||
type = "Command" | ||
command = "git commit -m \"chore: prepare releases\"" | ||
|
||
[[workflows.steps]] | ||
type = "Command" | ||
command = "git push --force --set-upstream origin release" | ||
|
||
[[workflows.steps]] | ||
type = "CreatePullRequest" | ||
base = "master" | ||
|
||
[workflows.steps.title] | ||
template = "chore: prepare releases" | ||
|
||
[workflows.steps.body] | ||
template = "This PR was created automatically. Merging it will create a new release. See changelogs for details." | ||
|
||
[[workflows]] | ||
name = "release" | ||
|
||
[[workflows.steps]] | ||
type = "Release" | ||
|
||
[github] | ||
owner = "SiaFoundation" | ||
repo = "sia-sdk-rs" |