name: Release
on:
workflow_run:
workflows: ["CI"]
branches: [main]
types: [completed]
permissions:
contents: write
pull-requests: write
jobs:
release:
name: Release unpublished packages
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main'
steps:
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libwayland-dev \
libxkbcommon-dev \
libasound2-dev \
libudev-dev \
libva-dev \
libgbm-dev \
libegl-dev \
libpipewire-0.3-dev \
libdav1d-dev \
nasm \
libavutil-dev \
libavcodec-dev \
libavformat-dev \
libavfilter-dev \
libavdevice-dev \
libswscale-dev \
libswresample-dev \
libclang-dev \
libxcb1-dev \
libxcb-render0-dev \
libxcb-shape0-dev \
libxcb-xfixes0-dev \
libdbus-1-dev
- uses: MarcoIeni/release-plz-action@v0.5
with:
command: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
release-pr:
name: Prepare the next release
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main'
concurrency:
group: release-plz-${{ github.event.workflow_run.head_branch }}
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libwayland-dev \
libxkbcommon-dev \
libasound2-dev \
libudev-dev \
libva-dev \
libgbm-dev \
libegl-dev \
libpipewire-0.3-dev \
libdav1d-dev \
nasm \
libavutil-dev \
libavcodec-dev \
libavformat-dev \
libavfilter-dev \
libavdevice-dev \
libswscale-dev \
libswresample-dev \
libclang-dev \
libxcb1-dev \
libxcb-render0-dev \
libxcb-shape0-dev \
libxcb-xfixes0-dev \
libdbus-1-dev
- uses: MarcoIeni/release-plz-action@v0.5
with:
command: release-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}