Skip to content

release

release #1

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: update version in build.gradle.kts
shell: bash
run: sed -i 's/^version = .*/version = "${{ github.event.inputs.version }}"/' build.gradle.kts
- name: commit, tag and push
shell: bash
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add build.gradle.kts
git commit -m "release: ${{ github.event.inputs.version }} [skip ci]"
git tag "v${{ github.event.inputs.version }}"
git push origin main --tags
publish:
needs: prepare
uses: ./.github/workflows/publish.yml
secrets: inherit
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 }}"