Skip to content

release

release #6

Workflow file for this run

# Release process support.
name: release
on:
push:
tags:
- "v*.*.*"
schedule:
- cron: "0 20 * * 0"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.event_name != 'merge_group' }}
defaults:
run:
shell: bash
jobs:
draft-release:
name: Create a release draft
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-24.04
outputs:
release-id: ${{ steps.create-release.outputs.id }}
upload-url: ${{ steps.create-release.outputs.upload_url }}
html-url: ${{ steps.create-release.outputs.html_url }}
timeout-minutes: 50
permissions:
contents: write
steps:
- name: Create release
id: create-release
uses: ncipollo/release-action@v1
with:
allowUpdates: false
draft: true
generateReleaseNotes: true
build:
needs:
- draft-release
uses: ./.github/workflows/_build.yml
secrets: inherit
permissions:
contents: write
with:
release-artifact-upload-url: ${{ needs.draft-release.outputs.upload-url }}
publish-release:
needs:
- draft-release
- build
name: Publish release
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-24.04
timeout-minutes: 50
permissions:
contents: write
steps:
- name: Publish release
uses: actions/github-script@v8
env:
RELEASE_ID: ${{ needs.draft-release.outputs.release-id }}
with:
script: |
github.rest.repos.updateRelease({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: process.env.RELEASE_ID,
draft: false
});