diff --git a/.changeset/v2_signing_implemented.md b/.changeset/v2_signing_implemented.md new file mode 100644 index 0000000..ef4c942 --- /dev/null +++ b/.changeset/v2_signing_implemented.md @@ -0,0 +1,5 @@ +--- +sia_sdk: patch +--- + +# v2 signing implemented diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml new file mode 100644 index 0000000..468aa13 --- /dev/null +++ b/.github/workflows/prepare-release.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9dd738b --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/knope.toml b/knope.toml new file mode 100644 index 0000000..3ddb986 --- /dev/null +++ b/knope.toml @@ -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"