Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace action with reusable workflows #7282

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 0 additions & 4 deletions .github/workflows/deny.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ on:
paths: [Cargo.lock]
merge_group:

env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always

concurrency: deny-${{ github.head_ref || github.run_id }}

jobs:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/publish-acvm.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Publish ACVM crates

on:
workflow_call:
inputs:
noir-ref:
description: The acvm reference to checkout
required: true
type: string
workflow_dispatch:
inputs:
noir-ref:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/publish-es-packages.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
name: Publish Noir ES Packages

on:
workflow_call:
inputs:
noir-ref:
description: The noir reference to checkout
required: false
default: 'master'
type: string
npm-tag:
description: Repository Tag to publish under
required: false
default: 'nightly'
type: string
workflow_dispatch:
inputs:
noir-ref:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/publish-nargo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
name: Publish Nargo

on:
workflow_call:
inputs:
tag:
description: The tag to build Nargo from (leave empty to build a nightly release from master)
required: false
type: string
features:
description: Extra feature flags to release with
required: false
type: string
publish:
description: Whether to publish the build artifacts
type: boolean
default: false
workflow_dispatch:
# Allow pushing a manual nightly release
inputs:
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/publish-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Dispatch to publish-nargo
uses: benc-uk/workflow-dispatch@v1
uses: ./.github/workflows/publish-nargo.yml
with:
workflow: publish-nargo.yml
token: ${{ secrets.NOIR_REPO_TOKEN }}
# Omitting a tag results in a nightly
inputs: "{ \"publish\": true }"

publish: true

- name: Dispatch to publish-es-packages
uses: benc-uk/workflow-dispatch@v1
uses: ./.github/workflows/publish-es-packages.yml
with:
workflow: publish-es-packages.yml
token: ${{ secrets.NOIR_REPO_TOKEN }}
inputs: "{ \"noir-ref\": \"${{ env.GITHUB_REF }}\", \"npm-tag\": \"nightly\" }"
noir-ref: ${{ env.GITHUB_REF }}
npm-tag: nightly
24 changes: 8 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,10 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Dispatch to publish workflow
uses: benc-uk/workflow-dispatch@v1
uses: noir-lang/noir/.github/workflows/publish-nargo.yml@master
with:
workflow: publish-nargo.yml
repo: noir-lang/noir
ref: master
token: ${{ secrets.GITHUB_TOKEN }}
inputs: '{ "tag": "${{ needs.release-please.outputs.tag-name }}", "publish": true }'
tag: ${{ needs.release-please.outputs.tag-name }}
publish: true

publish-es-packages:
name: Publish ES packages
Expand All @@ -163,12 +160,10 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Dispatch to publish-es-packages
uses: benc-uk/workflow-dispatch@v1
uses: noir-lang/noir/.github/workflows/publish-es-packages.yml@master
with:
workflow: publish-es-packages.yml
ref: master
token: ${{ secrets.NOIR_REPO_TOKEN }}
inputs: '{ "noir-ref": "${{ needs.release-please.outputs.tag-name }}", "npm-tag": "latest" }'
noir-ref: ${{ needs.release-please.outputs.tag-name }}
npm-tag: "latest"

publish-acvm:
name: Publish acvm
Expand All @@ -178,9 +173,6 @@ jobs:

steps:
- name: Dispatch to publish-acvm
uses: benc-uk/workflow-dispatch@v1
uses: noir-lang/noir/.github/workflows/publish-acvm.yml@master
with:
workflow: publish-acvm.yml
ref: master
token: ${{ secrets.NOIR_REPO_TOKEN }}
inputs: '{ "noir-ref": "${{ needs.release-please.outputs.tag-name }}" }'
noir-ref: ${{ needs.release-please.outputs.tag-name }}
Loading