Skip to content

Commit 5bdaca0

Browse files
committed
Bump versions.
1 parent a12b467 commit 5bdaca0

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

.github/workflows/bump.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,65 @@ name: Bump version
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
new_version:
7+
type: string
8+
description: New version number, like 'x.y.z'
9+
required: true
10+
changelog:
11+
type: string
12+
description: Details to prepend to `CHANGELOG.md`
13+
required: true
514

615
jobs:
716
bump-version:
817
runs-on: ubuntu-latest
918

1019
steps:
1120
- uses: actions/checkout@v2
21+
22+
- name: Bump version
23+
run: |
24+
old_version=$(sed -e 's/.*=//' version.properties)
25+
echo "old version: _$old_version"_
26+
echo "new version: _${{ github.event.inputs.new_version }}_"
27+
echo changelog: _${{ github.event.inputs.changelog }}_"
28+
29+
echo "# ${{ github.event.inputs.new_version }}" >> new_CHANGELOG.md
30+
echo >> new_CHANGELOG.md
31+
echo "${{ github.event.inputs.changelog }}" >> new_CHANGELOG.md
32+
echo >> new_CHANGELOG.md
33+
cat CHANGELOG.md >> new_CHANGELOG.md
34+
mv new_CHANGELOG.md CHANGELOG.md
35+
36+
sed -i -e "s/$old_version/${{ github.event.inputs.new_version }}/" README.md version.properties
37+
38+
echo "version=${{ github.event.inputs.new_version }}" > version.properties
39+
40+
git diff
41+
42+
# jobs:
43+
# bump-version:
44+
# runs-on: ubuntu-latest
45+
46+
# steps:
47+
# - uses: actions/checkout@v2
48+
49+
# - name: Set up JDK 8
50+
# uses: actions/setup-java@v2
51+
# with:
52+
# java-version: '8'
53+
# distribution: 'adopt'
54+
55+
# - name: Write gradle.properties
56+
# env:
57+
# GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
58+
# GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
59+
# run: |
60+
# mkdir -p $HOME/.gradle/
61+
# echo "gradle.publish.key=${GRADLE_PUBLISH_KEY}" >> ~/.gradle/gradle.properties
62+
# echo "gradle.publish.secret=${GRADLE_PUBLISH_SECRET}" >> ~/.gradle/gradle.properties
63+
64+
# - name: Publish plugin
65+
# run: |
66+
# ./gradlew publishPlugins

version.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
version=0.9.1

0 commit comments

Comments
 (0)