mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
66 lines
1.9 KiB
YAML
66 lines
1.9 KiB
YAML
name: Release-plz
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
|
|
# Release unpublished packages.
|
|
release-plz-release:
|
|
if: ${{ github.repository_owner == 'nearai' }}
|
|
name: Release-plz release
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- &checkout
|
|
name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
- &install-rust
|
|
name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
# Generating a GitHub token, so that PRs and tags created by
|
|
# the release-plz-action can trigger actions workflows.
|
|
- name: Generate GitHub token
|
|
uses: actions/create-github-app-token@v2
|
|
id: generate-token
|
|
with:
|
|
# GitHub App ID secret name
|
|
app-id: ${{ secrets.GH_RELEASES_MANAGER_APP_ID }}
|
|
# GitHub App private key secret name
|
|
private-key: ${{ secrets.GH_RELEASES_MANAGER_APP_PRIVATE_KEY }}
|
|
- name: Run release-plz
|
|
uses: release-plz/[email protected]
|
|
with:
|
|
command: release
|
|
env:
|
|
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
|
|
|
# Create a PR with the new versions and changelog, preparing the next release.
|
|
release-plz-pr:
|
|
if: ${{ github.repository_owner == 'nearai' }}
|
|
name: Release-plz PR
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
concurrency:
|
|
group: release-plz-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
steps:
|
|
- *checkout
|
|
- *install-rust
|
|
- name: Run release-plz
|
|
uses: release-plz/[email protected]
|
|
with:
|
|
command: release-pr
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|