From bc248c4fc915136190403f615c8baa829d9eea05 Mon Sep 17 00:00:00 2001 From: Nate Date: Mon, 18 Nov 2024 13:30:56 -0800 Subject: [PATCH] ci(automation): add knope changelogs --- .changeset/automate_changelog_generation.md | 5 ++ .github/workflows/prepare-release.yml | 26 +++++++++++ CHANGELOG.md | 14 ++++++ knope.toml | 51 +++++++++++++++++++++ 4 files changed, 96 insertions(+) create mode 100644 .changeset/automate_changelog_generation.md create mode 100644 .github/workflows/prepare-release.yml create mode 100644 CHANGELOG.md create mode 100644 knope.toml diff --git a/.changeset/automate_changelog_generation.md b/.changeset/automate_changelog_generation.md new file mode 100644 index 00000000..070e0edc --- /dev/null +++ b/.changeset/automate_changelog_generation.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +# Automate changelog generation diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml new file mode 100644 index 00000000..44f68061 --- /dev/null +++ b/.github/workflows/prepare-release.yml @@ -0,0 +1,26 @@ +on: + push: + branches: [master] + +permissions: + contents: write + pull-requests: write + +name: Create Release PR +jobs: + prepare-release: + if: "!contains(github.event.head_commit.message, 'chore: prepare release')" # Skip merges from releases + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.2.2 + with: + fetch-depth: 0 + - name: Configure Git + run: | + git config --global user.name GitHub Actions + git config user.email github-actions@github.com + - uses: knope-dev/action@407e9ef7c272d2dd53a4e71e39a7839e29933c48 + - run: knope prepare-release --verbose + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + continue-on-error: true diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..d67ef482 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,14 @@ +## 1.1.2 + +### Breaking changes +* Max collateral no longer auto-calculates and is visible in "Basic" pricing mode (https://github.com/SiaFoundation/hostd/pull/421) + +### Features +* Migrated sectors are included in volume writes (https://github.com/SiaFoundation/hostd/pull/395) +* Timeout was increased when writing large merkle proofs for slow connections (https://github.com/SiaFoundation/hostd/pull/408) + +### Fixed +* Fixed an error when renters attempted to trim a large number of sectors from a contract https://github.com/SiaFoundation/hostd/pull/410 +* Fixed the calculation for unconfirmed transactions (https://github.com/SiaFoundation/hostd/pull/415) +* Fixed an issue where transaction information would not show when clicking a transaction in the wallet (https://github.com/SiaFoundation/hostd/pull/416) +* `hostd` will no longer crash on startup if the explorer is unavailable or misconfigured (https://github.com/SiaFoundation/hostd/pull/430) diff --git a/knope.toml b/knope.toml new file mode 100644 index 00000000..bae8d51b --- /dev/null +++ b/knope.toml @@ -0,0 +1,51 @@ +[package] +changelog = "CHANGELOG.md" + +[[workflows]] +name = "document-change" + +[[workflows.steps]] +type = "CreateChangeFile" + +[[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 release $version\"" + +[[workflows.steps]] +type = "Command" +command = "git push --force --set-upstream origin release" + +[workflows.steps.variables] +"$version" = "Version" + +[[workflows.steps]] +type = "CreatePullRequest" +base = "main" + +[workflows.steps.title] +template = "chore: prepare release $version" +variables = { "$version" = "Version" } + +[workflows.steps.body] +template = "This PR was created automatically. Merging it will finalize the changelog for $version\n\n$changelog" +variables = { "$changelog" = "ChangelogEntry", "$version" = "Version" } + +[[workflows]] +name = "release" + +[[workflows.steps]] +type = "Release" + +[github] +owner = "SiaFoundation" +repo = "hostd"