Manual crates publication #10
Workflow file for this run
This file contains hidden or 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
| name: Manual crates publication | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| commit_sha: | |
| description: | | |
| SHA of the commit on which the mithril crates should be obtained. | |
| required: true | |
| type: string | |
| package: | |
| description: | | |
| Packages(s) to be published to crates.io registry. | |
| required: true | |
| type: choice | |
| options: | |
| - all | |
| - mithril-stm | |
| - mithril-common | |
| - mithril-client | |
| - mithril-aggregator-client | |
| - mithril-aggregator-discovery | |
| - mithril-build-script | |
| - mithril-cardano-node-internal-database | |
| dry_run: | |
| description: Dry run will not publish to crates.io registry. | |
| required: true | |
| type: boolean | |
| default: true | |
| jobs: | |
| publish-crate: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Prepare | |
| id: prepare | |
| run: | | |
| if [[ ${{ inputs.package }} == 'all' ]]; then | |
| echo "packages=mithril-stm, mithril-build-script, mithril-common, mithril-aggregator-client, mithril-aggregator-discovery, mithril-cardano-node-internal-database, mithril-client" >> $GITHUB_OUTPUT | |
| else | |
| echo "packages=${{ inputs.package }}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Checkout sources | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ inputs.commit_sha }} | |
| - name: Install stable toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - name: ${{ inputs.dry_run && 'Test publish' || 'Publish' }} package to crates.io | |
| uses: ./.github/workflows/actions/publish-rust-crates | |
| with: | |
| dry_run: ${{ inputs.dry_run }} | |
| packages: ${{ steps.prepare.outputs.packages }} | |
| api_token: ${{ secrets.CRATES_IO_API_TOKEN }} |