Skip to content

Publish to crates.io #60

Publish to crates.io

Publish to crates.io #60

Workflow file for this run

name: "Publish to crates.io"
permissions:
pull-requests: write
contents: write
on:
workflow_dispatch:
jobs:
release-plz:
name: Release-plz
runs-on: ubuntu-latest
steps:
- name: Generate GitHub token
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.RELEASER_APP_ID }}
private-key: ${{ secrets.RELEASER_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ steps.generate-token.outputs.token }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-hakari
uses: taiki-e/install-action@v2
with:
tool: cargo-hakari
- name: Set git identity
run: |
git config --global user.name "pavex-releaser[bot]"
git config --global user.email "[email protected]"
- name: Remove workspace hack from Cargo.toml
run: |
cd libs
cargo hakari disable
cargo hakari remove-deps -y
git add .
git commit -am "Disable workspace hack before a release" || echo "No changes to commit"
- name: Run release-plz
uses: MarcoIeni/[email protected]
with:
project_manifest: "libs/Cargo.toml"
config: "libs/.release-plz.toml"
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}