From 476abcdf12145588712097be4d95c00ff78560f7 Mon Sep 17 00:00:00 2001 From: AlexsJones Date: Mon, 6 Jan 2025 14:11:41 +0000 Subject: [PATCH] feat: adding release please Signed-off-by: AlexsJones --- .github/workflows/release.yaml | 26 +++++++++++- .release-please-manifest.json | 1 + Cargo.toml | 2 +- release-please-config.json | 72 ++++++++++++++++++++++++++++++++++ 4 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1b2253e..b1af596 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,7 +14,27 @@ defaults: shell: bash jobs: + release-please: + permissions: + contents: write # for google-github-actions/release-please-action to create release commit + pull-requests: write # for google-github-actions/release-please-action to create release PR + runs-on: ubuntu-latest + outputs: + releases_created: ${{ steps.release.outputs.releases_created }} + tag_name: ${{ steps.release.outputs.tag_name }} + # Release-please creates a PR that tracks all changes + steps: + - name: Checkout + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 + - uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4 + id: release + with: + command: manifest + token: ${{secrets.GITHUB_TOKEN}} + default-branch: main + release: + needs: release-please name: release ${{ matrix.target }} runs-on: ubuntu-latest strategy: @@ -29,4 +49,8 @@ jobs: BUF_TOKEN: ${{ secrets.BUF_TOKEN }} run: | cargo login --registry buf "Bearer $BUF_TOKEN" - - run: cargo +${{ matrix.target }} build --release \ No newline at end of file + - run: cargo +${{ matrix.target }} build --release + - uses: taiki-e/upload-rust-binary-action@v1 + with: + bin: power_nerd + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..e95d353 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1 @@ +{".git p":"0.0.0",".":"1.0.0"} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 53ce8ad..227f927 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "power_nerd" -version = "0.1.0" +version = "0.0.1" # x-release-please-version edition = "2021" [dependencies] diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..85ea023 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,72 @@ +{ + "packages": { + ".": { + "changelog-path": "CHANGELOG.md", + "release-type": "go", + "prerelease": false, + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "draft": false, + "extra-files": [ + "README.md", + "Crago.toml" + ], + "changelog-sections": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "chore", + "section": "Other" + }, + { + "type": "docs", + "section": "Docs" + }, + { + "type": "perf", + "section": "Performance" + }, + { + "type": "build", + "hidden": true, + "section": "Build" + }, + { + "type": "deps", + "section": "Dependency Updates" + }, + { + "type": "ci", + "hidden": true, + "section": "CI" + }, + { + "type": "refactor", + "section": "Refactoring" + }, + { + "type": "revert", + "hidden": true, + "section": "Reverts" + }, + { + "type": "style", + "hidden": true, + "section": "Styling" + }, + { + "type": "test", + "hidden": true, + "section": "Tests" + } + ] + } + }, + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" +} \ No newline at end of file