forked from hayorov/allure-jenkins-plugin
-
Notifications
You must be signed in to change notification settings - Fork 73
61 lines (58 loc) · 2.22 KB
/
release.yml
File metadata and controls
61 lines (58 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Release
run-name: Release ${{ inputs.releaseVersion }} (next ${{ inputs.nextVersion }}) by ${{ github.actor }}
on:
workflow_dispatch:
inputs:
releaseVersion:
description: "The release version to publish (for example 2.36.0)"
required: true
nextVersion:
description: "The next development version without the -SNAPSHOT suffix"
required: true
permissions:
contents: read
jobs:
triage:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: "Check release version"
run: |
echo "${{ github.event.inputs.releaseVersion }}" | grep -Eq '^[0-9]+(\.[0-9]+)+$'
- name: "Check next version"
run: |
echo "${{ github.event.inputs.nextVersion }}" | grep -Eq '^[0-9]+(\.[0-9]+)+$'
- uses: actions/checkout@v6
with:
ref: ${{ github.ref_name }}
fetch-depth: 0
token: ${{ secrets.QAMETA_CI }}
- name: "Configure CI Git User"
run: |
git config --global user.name qameta-ci
git config --global user.email qameta-ci@qameta.io
- name: "Set release version"
run: |
./mvnw versions:set -DnewVersion=${{ github.event.inputs.releaseVersion }}
- 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: |
./mvnw versions:set -DnewVersion=${{ github.event.inputs.nextVersion }}-SNAPSHOT
- 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 }}
- name: "Publish GitHub Release"
uses: octokit/request-action@v2.x
with:
route: POST /repos/${{ github.repository }}/releases
tag_name: ${{ github.event.inputs.releaseVersion }}
generate_release_notes: true
target_commitish: ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.QAMETA_CI }}