Skip to content

Commit 8a8b5f0

Browse files
committed
add release workflow and refactor pre-release
Signed-off-by: Andre Bossert <anb0s@anbos.de>
1 parent 583cfba commit 8a8b5f0

File tree

4 files changed

+95
-15
lines changed

4 files changed

+95
-15
lines changed

.github/workflows/build-release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: Build-Release
5+
6+
on:
7+
push:
8+
branches:
9+
- 'release*'
10+
11+
jobs:
12+
13+
default:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v2
19+
with:
20+
java-version: '11'
21+
distribution: 'temurin'
22+
cache: maven
23+
- name: Build release for default platform
24+
run: 'mvn -Dsite.dir=release clean verify'
25+
- name: Assign build.version.properties to env variable
26+
run: cat site/target/build.version.properties >> $GITHUB_ENV
27+
- name: Create Pull Request
28+
uses: peter-evans/create-pull-request@v3
29+
with:
30+
commit-message: '[${{ env.build_version_major_minor }}] release build ${{ env.build_version_full }}'
31+
title: '[${{ env.build_version_major_minor }}] release build ${{ env.build_version_full }}'
32+
body: |
33+
[Milestone ${{ env.build_version_unqualified }}](https://github.com/anb0s/EasyShell/milestone/${{ env.build_version_milestone }}?closed=1)
34+
labels: |
35+
help wanted
36+
Version ${{ env.build_version_unqualified }}
37+
milestone: ${{ env.build_version_milestone }}
38+
delete-branch: true
39+
base: main

.github/workflows/testing.yml renamed to .github/workflows/build-testing.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
33

4-
name: Testing
4+
name: Build-Testing
55

66
on:
77
push:
@@ -23,20 +23,17 @@ jobs:
2323
- name: Build testing for default platform
2424
run: 'mvn -Dsite.dir=testing clean verify'
2525
- name: Assign build.version.properties to env variable
26-
run: cat site/updates/testing/build.version.properties >> $GITHUB_ENV
26+
run: cat site/target/build.version.properties >> $GITHUB_ENV
2727
- name: Create Pull Request
2828
uses: peter-evans/create-pull-request@v3
2929
with:
3030
commit-message: '[${{ env.build_version_major_minor }}] testing build ${{ env.build_version_full }}'
31-
title: '[${{ env.build_version_major_minor }}] testing of build ${{ env.build_version_full }}'
31+
title: '[${{ env.build_version_major_minor }}] testing build ${{ env.build_version_full }}'
3232
body: |
33-
### Fixed issues
34-
35-
[milestone ${{ env.build_version_unqualified }}](https://github.com/anb0s/EasyShell/milestone/${{ env.build_version_milestone }}?closed=1)
33+
[Milestone ${{ env.build_version_unqualified }}](https://github.com/anb0s/EasyShell/milestone/${{ env.build_version_milestone }}?closed=1)
3634
labels: |
3735
help wanted
3836
Version ${{ env.build_version_unqualified }}
3937
milestone: ${{ env.build_version_milestone }}
4038
delete-branch: true
41-
branch: staging
4239
base: main

.github/workflows/pre_release.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ name: Pre-Release
66
on:
77
push:
88
tags:
9-
- "v*.*.*-pre*"
10-
- "v*.*.*-alpha*"
11-
- "v*.*.*-beta*"
12-
- "v*.*.*-rc*"
9+
- "v[0-9]+.[0-9]+.[0-9]+-alpha*"
10+
- "v[0-9]+.[0-9]+.[0-9]+-beta*"
11+
- "v[0-9]+.[0-9]+.[0-9]+-rc*"
1312

1413
jobs:
1514

@@ -36,13 +35,13 @@ jobs:
3635
generate_release_notes: true
3736
prerelease: true
3837
body: |
39-
### Testing of the build **${{ env.build_version_full }}**
38+
### Testing build **${{ env.build_version_full }}**
4039
41-
All version testing update site: `http://anb0s.github.io/EasyShell/testing`
42-
Exact version only update site: `http://anb0s.github.io/EasyShell/testing/${{ env.build_version_path }}`
40+
All versions update site: `http://anb0s.github.io/EasyShell/testing`
41+
Exact version update site: `http://anb0s.github.io/EasyShell/testing/${{ env.build_version_path }}`
4342
Version: `EasyShell ${{ env.build_version_full }}`
4443
45-
**Use "Help | Install New Software...", paste the link and select the right version!**
44+
**Use "Help | Install New Software...", paste the update site link and select the right version!**
4645
4746
[Milestone ${{ env.build_version_unqualified }}](https://github.com/anb0s/EasyShell/milestone/${{ env.build_version_milestone }}?closed=1)
4847
files: EasyShell-${{ env.build_version_full }}.zip

.github/workflows/release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3+
4+
name: Release
5+
6+
on:
7+
push:
8+
tags:
9+
- "v[0-9]+.[0-9]+.[0-9]+"
10+
11+
jobs:
12+
13+
deploy-release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Deploy for Release
18+
uses: JamesIves/github-pages-deploy-action@v4
19+
with:
20+
branch: gh-pages
21+
folder: site/updates
22+
clean: false
23+
- name: Assign build.version.properties to env variable
24+
run: cat site/updates/release/build.version.properties >> $GITHUB_ENV
25+
- name: 'Zip artifacts ${{ env.build_version_full }} for Release'
26+
uses: papeloto/action-zip@v1
27+
with:
28+
files: site/updates/release/${{ env.build_version_path }}
29+
dest: EasyShell-${{ env.build_version_full }}.zip
30+
- name: Release
31+
uses: softprops/action-gh-release@v1
32+
with:
33+
generate_release_notes: true
34+
prerelease: false
35+
body: |
36+
### Release build **${{ env.build_version_full }}**
37+
38+
All versions update site: `http://anb0s.github.io/EasyShell`
39+
Exact version update site: `http://anb0s.github.io/EasyShell/release/${{ env.build_version_path }}`
40+
Version: `EasyShell ${{ env.build_version_full }}`
41+
42+
**Use "Help | Install New Software...", paste the update site link and select the right version!**
43+
44+
[Milestone ${{ env.build_version_unqualified }}](https://github.com/anb0s/EasyShell/milestone/${{ env.build_version_milestone }}?closed=1)
45+
files: EasyShell-${{ env.build_version_full }}.zip

0 commit comments

Comments
 (0)