This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add release-please and publish workflows to project (#172)
- Loading branch information
Showing
3 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Publish crate | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
ref: | ||
description: The reference to checkout | ||
required: true | ||
|
||
jobs: | ||
publish: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
|
||
- name: Setup toolchain | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: 1.66.0 | ||
|
||
- name: Publish acvm-backend-barretenberg | ||
run: | | ||
cargo publish --package acvm-backend-barretenberg --no-verify | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
release-please: | ||
name: Create Release | ||
outputs: | ||
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: | ||
release-type: rust | ||
bump-minor-pre-major: true | ||
bump-patch-for-minor-pre-major: true | ||
pull-request-title-pattern: "chore: Release ${version}" | ||
extra-files: | | ||
flake.nix | ||
publish: | ||
name: Publish crates | ||
needs: [release-please] | ||
if: ${{ needs.release-please.outputs.tag-name }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Dispatch to publish workflow | ||
uses: benc-uk/workflow-dispatch@v1 | ||
with: | ||
workflow: publish.yml | ||
ref: master | ||
inputs: '{ "ref": "${{ needs.release-please.outputs.tag-name }}" }' |