Fix documentation #54
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
name: publish | |
on: | |
push: | |
tags: | |
- v* | |
workflow_dispatch: | |
inputs: | |
dry_run: | |
type: boolean | |
default: false | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# I had a check here if the versions are already existing but magically with gh actions it returned a false | |
# positive. | |
- name: Publish internal | |
run: | | |
DRY_RUN=${{ github.event.inputs.dry_run }} | |
DRY_RUN=${DRY_RUN:-"false"} | |
cd internal && cargo publish $(if $DRY_RUN; then echo "--dry-run"; fi) --token ${{ secrets.CRATES_TOKEN }} | |
# Sleep 10 seconds if publishing. Without this the "Publish main" step fails as it can't find the correct | |
# crunchyroll-rs-internal version, since the step is faster than crates.io can process the new crunchyroll-rs-internal | |
# version | |
- name: Sleep in non dry run | |
if: github.event.inputs.dry_run != 'true' | |
run: sleep 10 | |
- name: Publish main | |
run: | | |
DRY_RUN=${{ github.event.inputs.dry_run }} | |
DRY_RUN=${DRY_RUN:-"false"} | |
cargo publish $(if $DRY_RUN; then echo "--dry-run"; fi) --token ${{ secrets.CRATES_TOKEN }} |