Crates IO Publish #4
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
name: Crates IO Publish | |
on: | |
workflow_dispatch: | |
inputs: | |
git_tag: | |
description: Git Tag To Release From. Last Git Tag Is Used If Omitted | |
required: false | |
ockam_publish_exclude_crates: | |
description: Exclude Specific Crates From Being Published | |
required: false | |
release_branch: | |
description: Release Branch Where Recent Bump Occurred | |
required: false | |
ockam_publish_recent_failure: | |
description: Indicate A Recent Failure | |
type: choice | |
default: 'false' | |
options: | |
- false | |
- true | |
permissions: | |
# Contents permission allows us read this repository. | |
contents: read | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
publish_crates: | |
runs-on: ubuntu-20.04 | |
container: | |
# Note: Do not update this image has it has installed all binaries | |
# to bump crates and generate changelogs which we don't want installed | |
# in our CI packages. | |
image: ghcr.io/build-trust/ockam-builder@sha256:a04b6a0aa01a93ba9a5c67392872893b261772dedfcd58f72a1addacf7535c09 | |
environment: release | |
name: "Publish Crates To Crates IO" | |
steps: | |
- name: Checkout Ockam | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.inputs.release_branch }} | |
- name: Publish Ockam Crates | |
env: | |
GIT_TAG: '${{ github.event.inputs.git_tag }}' | |
OCKAM_PUBLISH_TOKEN: '${{ secrets.CRATES_IO_PUBLISH_TOKEN }}' | |
OCKAM_PUBLISH_RECENT_FAILURE: '${{ github.event.inputs.ockam_publish_recent_failure }}' | |
OCKAM_PUBLISH_EXCLUDE_CRATES: '${{ github.event.inputs.ockam_publish_exclude_crates }}' | |
run: | | |
bash -ex ./tools/scripts/release/crate-publish.sh |