Add support for workflow_dispatch
#8
Workflow file for this run
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
# Generates and uploads new Plonk artifacts to S3 on every push to `dev` and manual release | ||
# On `push`, the version/file name is the commit hash | ||
# Use `workflow_dispatch` for Sphinx releases, with manually specified version name | ||
name: Regenerate S3 Plonk artifacts | ||
on: | ||
push: | ||
branches: dev | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Artifact version used for archive name, e.g. v1.0.0-testnet" | ||
type: string | ||
required: true | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
jobs: | ||
name: | ||
runs-on: warp-ubuntu-latest-x64-32x | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: argumentcomputer/ci-workflows | ||
- uses: ./.github/actions/ci-env | ||
- uses: actions/checkout@v4 | ||
- name: Setup CI | ||
uses: ./.github/actions/setup | ||
with: | ||
pull_token: ${{ secrets.REPO_TOKEN }} | ||
- name: Parse inputs | ||
run: | | ||
if [[ "${{ github.event_name }}" == "push" ]]; then | ||
VERSION=$(git rev-parse --short HEAD) | ||
else | ||
VERSION=${{ inputs.version }} | ||
fi | ||
echo "VERSION=$VERSION" | tee -a $GITHUB_ENV | ||
- name: Install AWS CLI | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y awscli | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v3 | ||
with: | ||
aws-access-key-id: ${{ secrets.S3_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.S3_SECRET_KEY }} | ||
aws-region: us-east-2 | ||
- name: Generate Plonk artifacts | ||
run: | | ||
make build-plonk-bn254 | ||
working-directory: ${{ github.workspace }}/prover | ||
- name: Release tarball on S3 | ||
echo "${{ env.VERSION }}" | make release-plonk-bn254 | ||
working-directory: ${{ github.workspace }}/prover |