Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Blueshift GitHub Actions and Workflows

Shared GitHub Actions and Workflows for Blueshift repositories.


Reusable workflows

release-crates

Tag-triggered crate publishing to crates.io using trusted publishing (OIDC). Works with workspace with multiple crates.

What it does

  1. Verifies the given tag matches the version in Cargo.toml.
  2. Publishes the crate via the publish-crates.
  3. Creates a draft release with generated notes.

Usage

name: Release

run-name: "Release ${{ github.ref_name }}"

on:
  push:
    tags: ["v*"]

jobs:
  crates:
    uses: blueshift-gg/github-actions/.github/workflows/release-crates.yml@master
    permissions:
      contents: write
      id-token: write
    with:
      tag: ${{ github.ref_name }}    # required
      environment: release           # optional; recommended to have an additional approval step
      timeout-minutes: 15            # optional; default 15
    secrets: inherit

Warning

The workflow publishes every workspace member by default. Any crate not meant to be published should disable publishing.

[package]
name = "xtask"
# ...
publish = false

Workflow inputs

input required default description
tag yes Tag or version to release (e.g. v0.4.2 or 0.4.2).
environment no Environment for the workflow.
timeout-minutes no 15 Run time limit for the workflow.

Behavior and failure modes

  • Workflow fails if the provided tag and the version in Cargo.toml mismatch.
  • Disrupted release (e.g. network issues). Rerun the workflow to continue publishing the unpublished crates.

Composite actions

publish-crates

Publishes a Rust crate to crates.io using trusted publishing (OIDC).

What it does

  1. Installs Rust toolchain and cargo-release
  2. Authenticates with crates.io via trusted publishing
  3. Publishes unpublished workspace crates

Usage

jobs:
  crates:
    runs-on: ubuntu-latest
    permissions:
      id-token: write    # required: crates.io trusted publishing
    steps:
      - name: Checkout
        uses: actions/checkout@v7

      - name: Publish crates
        uses: blueshift-gg/github-actions/publish-crates@master

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors