name: Publish
on:
pull_request:
types: [closed]
workflow_dispatch:
permissions:
contents: write
concurrency:
group: publish-${{ github.ref }}
cancel-in-progress: false
jobs:
crate:
if: >-
github.event_name == 'workflow_dispatch' ||
(github.event.pull_request.merged &&
github.event.pull_request.head.ref == 'version-packages')
runs-on: ubuntu-latest
outputs:
has_assets: ${{ steps.plan.outputs.has_assets }}
tag: ${{ steps.plan.outputs.tag }}
matrix: ${{ steps.plan.outputs.matrix }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with:
ref: ${{ github.event.pull_request.merge_commit_sha || github.sha }}
fetch-depth: 0
- uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 with:
version: 2026.8.2
cache: true
- run: mise install --locked
- id: plan
run: verctl assets --github-output "$GITHUB_OUTPUT"
- uses: victor-software-house/verctl/actions/publish@main
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
assets:
name: ${{ matrix.id }}
needs: crate
if: needs.crate.outputs.has_assets == 'true'
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.crate.outputs.matrix) }}
runs-on: ${{ matrix.labels }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with:
ref: ${{ github.event.pull_request.merge_commit_sha || github.sha }}
fetch-depth: 0
- uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 with:
version: 2026.8.2
cache: true
- run: mise install --locked
- uses: victor-software-house/verctl/actions/asset@main
with:
target: ${{ matrix.id }}
tag: ${{ needs.crate.outputs.tag }}