From 82823d8cd6882b191a7b363aa40344f66dfd7af7 Mon Sep 17 00:00:00 2001 From: PhilWindle <60546371+PhilWindle@users.noreply.github.com> Date: Fri, 8 Sep 2023 11:51:56 +0100 Subject: [PATCH] chore(build): Unify barretenberg releases with aztec-packages (#2120) This PR unifies the release of barretenberg with the wider aztec-packages repo. # Checklist: Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge. - [ ] If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag. - [ ] I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code. - [ ] Every change is related to the PR description. - [ ] I have [linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) this pull request to relevant issues (if any exist). --- .../workflows/publish-bb.yml | 0 .github/workflows/release_please.yml | 45 ++++++----------- .release-please-manifest.json | 1 + .../.github/workflows/release-please.yml | 34 ------------- .../.release-please-manifest.json | 1 - .../barretenberg/release-please-config.json | 36 -------------- release-please-config.json | 49 +++++++++++++++++++ 7 files changed, 66 insertions(+), 100 deletions(-) rename circuits/cpp/barretenberg/.github/workflows/publish.yml => .github/workflows/publish-bb.yml (100%) create mode 100644 .release-please-manifest.json delete mode 100644 circuits/cpp/barretenberg/.github/workflows/release-please.yml delete mode 100644 circuits/cpp/barretenberg/.release-please-manifest.json delete mode 100644 circuits/cpp/barretenberg/release-please-config.json create mode 100644 release-please-config.json diff --git a/circuits/cpp/barretenberg/.github/workflows/publish.yml b/.github/workflows/publish-bb.yml similarity index 100% rename from circuits/cpp/barretenberg/.github/workflows/publish.yml rename to .github/workflows/publish-bb.yml diff --git a/.github/workflows/release_please.yml b/.github/workflows/release_please.yml index f65c7bdce51..636d4c57b59 100644 --- a/.github/workflows/release_please.yml +++ b/.github/workflows/release_please.yml @@ -5,6 +5,7 @@ on: push: branches: - master + - pw/bb-releases permissions: contents: write @@ -12,35 +13,21 @@ permissions: jobs: release-please: + name: Create Release runs-on: ubuntu-latest steps: - - uses: google-github-actions/release-please-action@v3 + - name: Run Release Please + id: release + uses: google-github-actions/release-please-action@v3 with: - # Our release type is simple as all we really want is to update the changelog and trigger a github release - release-type: simple - # Self explanatory - package-name: aztec-packages - # Marks github releases as 'Pre-Release' - prerelease: true - # Our default branch - default-branch: master - # Uses the 'prerelease' versioning strategy to update the pre-release number only e.g. 0.1.0-alpha23 -> 0.1.0-alpha24 - versioning-strategy: prerelease - # Don't include the component name in the tag name - include-component-in-tag: false - # Influences the versioning strategy to only update the pre-release number - bump-minor-pre-major: true - # Influences the versioning strategy to only update the pre-release number - bump-patch-for-minor-pre-major: true - # Just a bit of test at the top of the 'Release PR' - pull-request-header: ":robot: I have created a new Aztec Packages release" - # The sections into which changes are grouped on the github release notes - changelog-types: > - [ - {"type":"feat","section":"Features","hidden":false}, - {"type":"fix","section":"Bug Fixes","hidden":false}, - {"type":"chore","section":"Miscellaneous","hidden":false}, - {"type":"test","section":"Miscellaneous","hidden":false}, - {"type":"refactor","section":"Miscellaneous","hidden":false}, - {"type":"docs","section":"Documentation","hidden":false} - ] + command: manifest + + - name: Dispatch to publish workflow + uses: benc-uk/workflow-dispatch@v1 + if: ${{ steps.release.outputs.tag_name }} + with: + workflow: publish-bb.yml + repo: AztecProtocol/aztec-packages + ref: master + token: ${{ secrets.GITHUB_TOKEN }} + inputs: '{ "tag": "${{ steps.release.outputs.tag_name }}", "publish": true }' diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 00000000000..5619a3a47fc --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1 @@ +{ ".": "0.5.1", "barretenberg": "0.5.1", "ts": "0.5.1" } diff --git a/circuits/cpp/barretenberg/.github/workflows/release-please.yml b/circuits/cpp/barretenberg/.github/workflows/release-please.yml deleted file mode 100644 index 2bd3176eef1..00000000000 --- a/circuits/cpp/barretenberg/.github/workflows/release-please.yml +++ /dev/null @@ -1,34 +0,0 @@ -on: - push: - branches: - - master - -permissions: - contents: write - pull-requests: write - -name: release-please - -jobs: - release-please: - name: Create Release - runs-on: ubuntu-latest - steps: - - name: Run Release Please - id: release - uses: google-github-actions/release-please-action@v3 - with: - command: manifest - - - name: Dispatch to publish workflow - uses: benc-uk/workflow-dispatch@v1 - if: ${{ steps.release.outputs.tag_name }} - with: - workflow: publish.yml - repo: AztecProtocol/barretenberg - ref: master - token: ${{ secrets.GITHUB_TOKEN }} - inputs: '{ "tag": "${{ steps.release.outputs.tag_name }}", "publish": true }' - - - diff --git a/circuits/cpp/barretenberg/.release-please-manifest.json b/circuits/cpp/barretenberg/.release-please-manifest.json deleted file mode 100644 index 4d7f4dbe45e..00000000000 --- a/circuits/cpp/barretenberg/.release-please-manifest.json +++ /dev/null @@ -1 +0,0 @@ -{".":"0.5.1","ts":"0.5.1"} \ No newline at end of file diff --git a/circuits/cpp/barretenberg/release-please-config.json b/circuits/cpp/barretenberg/release-please-config.json deleted file mode 100644 index 2c95ad8f285..00000000000 --- a/circuits/cpp/barretenberg/release-please-config.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "release-type": "simple", - "bump-minor-pre-major": true, - "bump-patch-for-minor-pre-major": true, - "prerelease": true, - "group-pull-request-title-pattern": "chore(barretenberg): Release ${version}", - "packages": { - ".": { - "release-type": "simple", - "component": "barretenberg", - "package-name": "barretenberg", - "extra-files" : [ - "cpp/CMakeLists.txt", - "VERSION", - "barretenberg.nix", - "barretenberg-wasm.nix" - ] - }, - "ts": { - "release-type": "node", - "package-name": "barretenberg.js", - "component": "barretenberg.js" - } - }, - "plugins" : [ - { - "type": "linked-versions", - "groupName": "barretenberg", - "components": [ - "barretenberg", - "barretenberg.js" - ] - }, - "sentence-case" - ] -} \ No newline at end of file diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 00000000000..62c868b0788 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,49 @@ +{ + "release-type": "simple", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "prerelease": true, + "group-pull-request-title-pattern": "chore(master): Release ${version}", + "pull-request-header": ":robot: I have created a new Aztec Packages release", + "versioning": "default", + "include-component-in-tag": true, + "changelog-sections": [ + { "type": "feat", "section": "Features", "hidden": false }, + { "type": "fix", "section": "Bug Fixes", "hidden": false }, + { "type": "chore", "section": "Miscellaneous", "hidden": false }, + { "type": "test", "section": "Miscellaneous", "hidden": false }, + { "type": "refactor", "section": "Miscellaneous", "hidden": false }, + { "type": "docs", "section": "Documentation", "hidden": false } + ], + "packages": { + ".": { + "release-type": "simple", + "component": "aztec-packages", + "package-name": "aztec-packages" + }, + "barrentenberg/ts": { + "release-type": "node", + "package-name": "barretenberg.js", + "component": "barretenberg.js" + }, + "barretenberg": { + "release-type": "simple", + "component": "barretenberg", + "package-name": "barretenberg", + "extra-files": [ + "cpp/CMakeLists.txt", + "VERSION", + "barretenberg.nix", + "barretenberg-wasm.nix" + ] + } + }, + "plugins": [ + { + "type": "linked-versions", + "groupName": "aztec-packages", + "components": ["barretenberg", "barretenberg.js", "aztec-packages"] + }, + "sentence-case" + ] +}