Skip to content

Prepare Release Crates #17

Prepare Release Crates

Prepare Release Crates #17

name: Prepare Release Crates
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
pull-requests: write
contents: write
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-D warnings"
jobs:
prepare_release:
name: Prepare Release Crates
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: Boshen/setup-rust@main
with:
cache-key: warm
tools: cargo-release-oxc
- name: Run
id: run
run: |
{
echo 'OUTPUT<<EOF'
cargo release-oxc update --release crates
echo EOF
} >> $GITHUB_OUTPUT
- name: Save Version
id: version
run: |
{
echo 'VERSION<<EOF'
echo '${{ steps.run.outputs.OUTPUT }}' | tail -n 1
echo EOF
} >> $GITHUB_OUTPUT
- name: Save Changelog
id: changelog
run: |
{
echo 'CHANGELOG<<EOF'
echo '${{ steps.run.outputs.OUTPUT }}' | head -n -1
echo EOF
} >> $GITHUB_OUTPUT
# update `Cargo.lock`
- run: cargo check
- uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Release crates
committer: Boshen <[email protected]>
author: Boshen <[email protected]>
branch: release/crates
branch-suffix: timestamp
title: Release crates v${{ steps.version.outputs.VERSION }}
body: ${{ steps.changelog.outputs.CHANGELOG }}
assignees: Boshen
reviewers: Boshen