Skip to content

Use crates.io Trusted publishing to publish releases to crates.io #821

Use crates.io Trusted publishing to publish releases to crates.io

Use crates.io Trusted publishing to publish releases to crates.io #821

Workflow file for this run

name: Rust
on:
pull_request:
workflow_dispatch:
merge_group:
types: [checks_requested]
schedule:
# Runs at 03:30, every Saturday
- cron: "30 3 * * 6"
# dispatches build workflow with different permissions
jobs:
build:
if: ${{ github.event_name != 'push' }}
uses: ./.github/workflows/build.yml
secrets: inherit
latest_stable_rust:
if: ${{ github.event_name == 'schedule' }}
uses: ./.github/workflows/build.yml
with:
rust_version: 'stable'
secrets: inherit
latest_beta_rust:
if: ${{ github.event_name == 'schedule' }}
uses: ./.github/workflows/build.yml
with:
rust_version: 'beta'
secrets: inherit
build_result:
name: Result
runs-on: ubuntu-latest
needs: ["build"]
if: ${{ always() }}
steps:
- name: Mark the job as successful
if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
run: exit 0
- name: Mark the job as unsuccessful
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: exit 1