mirror of
https://github.com/Devolutions/IronRDP.git
synced 2026-11-24 01:04:51 +00:00
82 lines
2.1 KiB
YAML
82 lines
2.1 KiB
YAML
name: Release crates
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
# Create a PR with the new versions and changelog, preparing the next release.
|
|
open-pr:
|
|
name: Open release PR
|
|
environment: cratesio-publish
|
|
runs-on: ubuntu-latest
|
|
concurrency:
|
|
group: release-plz-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 512
|
|
|
|
- name: Run release-plz
|
|
id: release-plz
|
|
uses: Devolutions/actions-public/release-plz@v1
|
|
with:
|
|
command: release-pr
|
|
git-name: Devolutions Bot
|
|
git-email: bot@devolutions.net
|
|
github-token: ${{ secrets.DEVOLUTIONSBOT_WRITE_TOKEN }}
|
|
|
|
- name: Update fuzz/Cargo.lock
|
|
if: ${{ steps.release-plz.outputs.did-open-pr == 'true' }}
|
|
run: |
|
|
$prRaw = '${{ steps.release-plz.outputs.pr }}'
|
|
Write-Host "prRaw: $prRaw"
|
|
|
|
$pr = $prRaw | ConvertFrom-Json
|
|
Write-Host "pr: $pr"
|
|
|
|
Write-Host "Fetch branch $($pr.head_branch)"
|
|
git fetch origin "$($pr.head_branch)"
|
|
|
|
Write-Host "Switch to branch $($pr.head_branch)"
|
|
git checkout "$($pr.head_branch)"
|
|
|
|
Write-Host "Update ./fuzz/Cargo.lock"
|
|
cargo update --manifest-path ./fuzz/Cargo.toml
|
|
|
|
Write-Host "Update last commit"
|
|
git add ./fuzz/Cargo.lock
|
|
git commit --amend --no-edit
|
|
|
|
Write-Host "Update the release pull request"
|
|
git push --force
|
|
shell: pwsh
|
|
|
|
# Release unpublished packages.
|
|
release:
|
|
name: Release crates
|
|
environment: cratesio-publish
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
id-token: write
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Authenticate with crates.io
|
|
id: auth
|
|
uses: rust-lang/crates-io-auth-action@v1
|
|
|
|
- name: Run release-plz
|
|
uses: Devolutions/actions-public/release-plz@v1
|
|
with:
|
|
command: release
|
|
registry-token: ${{ steps.auth.outputs.token }}
|