From f4f09e561fffbf7a2b38bc1d26d5cf7e5ed2520e Mon Sep 17 00:00:00 2001 From: saleel Date: Fri, 4 Oct 2024 14:36:12 +0530 Subject: [PATCH] chore: add release-please (#21) --- .github/workflows/pull-request-title.yml | 30 ++++++++++++++++++++++++ .github/workflows/release.yml | 21 +++++++++++++++++ .gitignore | 2 +- .release-please-manifest.json | 1 + lib/Nargo.toml | 2 +- release-please-config.json | 16 +++++++++++++ 6 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pull-request-title.yml create mode 100644 .github/workflows/release.yml create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflows/pull-request-title.yml b/.github/workflows/pull-request-title.yml new file mode 100644 index 0000000..901d76a --- /dev/null +++ b/.github/workflows/pull-request-title.yml @@ -0,0 +1,30 @@ +name: Pull Request + +on: + merge_group: + pull_request_target: + types: + - opened + - reopened + - edited + - synchronize + +permissions: + pull-requests: read + +jobs: + conventional-title: + name: Validate PR title is Conventional Commit + runs-on: ubuntu-latest + steps: + - name: Check title + if: github.event_name == 'pull_request_target' + uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + fix + feat + chore + \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0e24c81 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,21 @@ +name: Release + +on: + push: + branches: + - main + +jobs: + release-please: + name: Create Release + outputs: + release-pr: ${{ steps.release.outputs.pr }} + tag-name: ${{ steps.release.outputs.tag_name }} + runs-on: ubuntu-latest + steps: + - name: Run release-please + id: release + uses: google-github-actions/release-please-action@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + command: manifest diff --git a/.gitignore b/.gitignore index 69703bf..250fa1b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ /target -./.DS_Store +**/.DS_Store .vscode diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..1c861e1 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1 @@ +{".":"0.3.0"} diff --git a/lib/Nargo.toml b/lib/Nargo.toml index 4e40224..ac8b8d0 100644 --- a/lib/Nargo.toml +++ b/lib/Nargo.toml @@ -5,4 +5,4 @@ authors = [""] compiler_version = ">=0.34.0" [dependencies] -bignum = {tag = "v0.3.4", git = "https://github.com/noir-lang/noir-bignum"} +bignum = {tag = "v0.3.5", git = "https://github.com/noir-lang/noir-bignum"} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..e33ce20 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,16 @@ +{ + "release-type": "simple", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "pull-request-title-pattern": "chore: Release ${version}", + "group-pull-request-title-pattern": "chore: Release ${version}", + "packages": { + ".": { + "release-type": "simple", + "include-component-in-tag": false + } + }, + "plugins": [ + "sentence-case" + ] +}