Skip to content

release

release #3

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version (e.g. 1.2.3)'
required: true
jobs:
prepare:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: create release branch, update version and tag
shell: bash
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b "release/v${{ github.event.inputs.version }}"
sed -i 's/^version = .*/version = "${{ github.event.inputs.version }}"/' build.gradle.kts
git add build.gradle.kts
git commit -m "release: ${{ github.event.inputs.version }}"
git tag "v${{ github.event.inputs.version }}"
git push origin "release/v${{ github.event.inputs.version }}" --tags
publish:
needs: prepare
uses: ./.github/workflows/publish.yml
secrets: inherit
with:
ref: v${{ github.event.inputs.version }}
github-release:
needs: publish
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: create GitHub release
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create "v${{ github.event.inputs.version }}" --generate-notes --title "v${{ github.event.inputs.version }}"