-
Notifications
You must be signed in to change notification settings - Fork 111
58 lines (48 loc) · 1.98 KB
/
cut-release.yml
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
name: Cut release
on:
workflow_dispatch:
inputs:
release-version:
description: "Version for the tagged release"
required: true
next-version:
description: "Next version"
required: true
jobs:
cut-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '8'
- name: git config
run: |
git config --global user.name "glow-release[bot]"
git config --global user.email "glow-release-bot@noreply.projectglow.io"
- name: Update version files for release
run: |
echo "${{ inputs.release-version }}" > stable-version.txt
sed -i "s/^VERSION =.*/VERSION = '${{ inputs.release-version }}'/" python/version.py
echo 'ThisBuild / version := "${{ inputs.release-version }}"' > version.sbt
git add stable-version.txt python/version.py version.sbt
git commit -m "Update version for release ${{ inputs.release-version }}" -s
- name: Create release tag
run: git tag v${{ inputs.release-version }}
- name: Push release tag
run: git push origin v${{ inputs.release-version }}
- name: Update versions for next release
run: |
sed -i "s/^VERSION =.*/VERSION = '${{ inputs.next-version }}-SNAPSHOT'/" python/version.py
echo 'ThisBuild / version := "${{ inputs.next-version }}-SNAPSHOT"' > version.sbt
- name: Open pull request for next version
uses: peter-evans/create-pull-request@v6
with:
signoff: true
branch: releases/${{ inputs.release-version }}
title: Update development version to ${{ inputs.next-version }}
body: Automatically created by the "Cut release" workflow
commit-message: Update development versions