Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

chore: Add release-please and publish workflows to project #172

Merged
merged 1 commit into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
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 }}
29 changes: 29 additions & 0 deletions .github/workflows/pull-request.yml
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
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
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 }}" }'