Skip to content

𝌚 Release

𝌚 Release #14

Workflow file for this run

name: 𝌚 Release
on:
workflow_dispatch:
inputs:
force-publish:
required: true
type: boolean
description: Publish Releases at Anytime
workflow_run:
workflows: [ πŸ§ͺ Tests and Checks ]
branches: [main]
types: [ completed ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release-please:
runs-on: ubuntu-latest
if: >
github.ref == 'refs/heads/main' &&
github.repository_owner == 'wnfs-wg' &&
github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- name: Run release-please
id: release
uses: google-github-actions/release-please-action@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
default-branch: main
command: manifest
extra-files: |
Cargo.toml
publish-release-crates:
runs-on: ubuntu-latest
needs: [ release-please ]
if: ${{ needs.release-please.outputs.release_created || github.event.inputs.force-publish }}
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Cache Project
uses: Swatinem/rust-cache@v2
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
override: true
profile: minimal
toolchain: stable
- name: Verify Publishing of crate
uses: katyo/publish-crates@v2
with:
dry-run: true
- name: Cargo Publish to crates.io
uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}