Release #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
releaseVersion: | |
description: "The release version in <MAJOR>.<MINOR>.<PATCH> format" | |
required: true | |
nextVersion: | |
description: "The next version in <MAJOR>.<MINOR> format WITHOUT SNAPSHOT SUFFIX" | |
required: true | |
jobs: | |
triage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Check release version" | |
run: | | |
expr "${{ github.event.inputs.releaseVersion }}" : '[[:digit:]][[:digit:]]*\.[[:digit:]][[:digit:]]*\.[[:digit:]][[:digit:]]*$' | |
- name: "Check next version" | |
run: | | |
expr "${{ github.event.inputs.nextVersion }}" : '[[:digit:]][[:digit:]]*\.[[:digit:]][[:digit:]]*$' | |
- uses: actions/[email protected] | |
with: | |
token: ${{ secrets.QAMETA_CI }} | |
- name: "Configure CI Git User" | |
run: | | |
git config --global user.name qameta-ci | |
git config --global user.email [email protected] | |
- name: "Set release version" | |
run: | | |
sed -i -e '/version=/s/.*/version=${{ github.event.inputs.releaseVersion }}/g' gradle.properties | |
cat gradle.properties | |
- name: "Commit release version and create tag" | |
run: | | |
git commit -am "release ${{ github.event.inputs.releaseVersion }}" | |
git tag ${{ github.event.inputs.releaseVersion }} | |
git push origin ${{ github.event.inputs.releaseVersion }} | |
- name: "Set next development version" | |
run: | | |
sed -i -e '/version=/s/.*/version=${{ github.event.inputs.nextVersion }}-SNAPSHOT/g' gradle.properties | |
cat gradle.properties | |
- name: "Commit next development version and push it" | |
run: | | |
git commit -am "set next development version ${{ github.event.inputs.nextVersion }}" | |
git push origin ${{ github.ref }} | |
- name: "Publish Github Release" | |
uses: octokit/[email protected] | |
with: | |
route: POST /repos/${{ github.repository }}/releases | |
tag_name: ${{ github.event.inputs.releaseVersion }} | |
generate_release_notes: true | |
target_commitish: ${{ github.ref }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.QAMETA_CI }} |