Skip to content

Commit

Permalink
feat: adding release please
Browse files Browse the repository at this point in the history
Signed-off-by: AlexsJones <[email protected]>
  • Loading branch information
AlexsJones committed Jan 6, 2025
1 parent 3dce044 commit 476abcd
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 2 deletions.
26 changes: 25 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -29,4 +49,8 @@ jobs:
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
run: |
cargo login --registry buf "Bearer $BUF_TOKEN"
- run: cargo +${{ matrix.target }} build --release
- run: cargo +${{ matrix.target }} build --release
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: power_nerd
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{".git p":"0.0.0",".":"1.0.0"}
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "power_nerd"
version = "0.1.0"
version = "0.0.1" # x-release-please-version
edition = "2021"

[dependencies]
Expand Down
72 changes: 72 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit 476abcd

Please sign in to comment.