Skip to content

Update dependencies and version #55

Update dependencies and version

Update dependencies and version #55

Workflow file for this run

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 }}