Skip to content

Commit

Permalink
add release workflow and refactor pre-release
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Bossert <[email protected]>
  • Loading branch information
anb0s committed Mar 27, 2022
1 parent 583cfba commit 8a8b5f0
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 15 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Build-Release

on:
push:
branches:
- 'release*'

jobs:

default:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build release for default platform
run: 'mvn -Dsite.dir=release clean verify'
- name: Assign build.version.properties to env variable
run: cat site/target/build.version.properties >> $GITHUB_ENV
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: '[${{ env.build_version_major_minor }}] release build ${{ env.build_version_full }}'
title: '[${{ env.build_version_major_minor }}] release build ${{ env.build_version_full }}'
body: |
[Milestone ${{ env.build_version_unqualified }}](https://github.com/anb0s/EasyShell/milestone/${{ env.build_version_milestone }}?closed=1)
labels: |
help wanted
Version ${{ env.build_version_unqualified }}
milestone: ${{ env.build_version_milestone }}
delete-branch: true
base: main
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Testing
name: Build-Testing

on:
push:
Expand All @@ -23,20 +23,17 @@ jobs:
- name: Build testing for default platform
run: 'mvn -Dsite.dir=testing clean verify'
- name: Assign build.version.properties to env variable
run: cat site/updates/testing/build.version.properties >> $GITHUB_ENV
run: cat site/target/build.version.properties >> $GITHUB_ENV
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: '[${{ env.build_version_major_minor }}] testing build ${{ env.build_version_full }}'
title: '[${{ env.build_version_major_minor }}] testing of build ${{ env.build_version_full }}'
title: '[${{ env.build_version_major_minor }}] testing build ${{ env.build_version_full }}'
body: |
### Fixed issues
[milestone ${{ env.build_version_unqualified }}](https://github.com/anb0s/EasyShell/milestone/${{ env.build_version_milestone }}?closed=1)
[Milestone ${{ env.build_version_unqualified }}](https://github.com/anb0s/EasyShell/milestone/${{ env.build_version_milestone }}?closed=1)
labels: |
help wanted
Version ${{ env.build_version_unqualified }}
milestone: ${{ env.build_version_milestone }}
delete-branch: true
branch: staging
base: main
15 changes: 7 additions & 8 deletions .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ name: Pre-Release
on:
push:
tags:
- "v*.*.*-pre*"
- "v*.*.*-alpha*"
- "v*.*.*-beta*"
- "v*.*.*-rc*"
- "v[0-9]+.[0-9]+.[0-9]+-alpha*"
- "v[0-9]+.[0-9]+.[0-9]+-beta*"
- "v[0-9]+.[0-9]+.[0-9]+-rc*"

jobs:

Expand All @@ -36,13 +35,13 @@ jobs:
generate_release_notes: true
prerelease: true
body: |
### Testing of the build **${{ env.build_version_full }}**
### Testing build **${{ env.build_version_full }}**
All version testing update site: `http://anb0s.github.io/EasyShell/testing`
Exact version only update site: `http://anb0s.github.io/EasyShell/testing/${{ env.build_version_path }}`
All versions update site: `http://anb0s.github.io/EasyShell/testing`
Exact version update site: `http://anb0s.github.io/EasyShell/testing/${{ env.build_version_path }}`
Version: `EasyShell ${{ env.build_version_full }}`
**Use "Help | Install New Software...", paste the link and select the right version!**
**Use "Help | Install New Software...", paste the update site link and select the right version!**
[Milestone ${{ env.build_version_unqualified }}](https://github.com/anb0s/EasyShell/milestone/${{ env.build_version_milestone }}?closed=1)
files: EasyShell-${{ env.build_version_full }}.zip
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Release

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:

deploy-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Deploy for Release
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: site/updates
clean: false
- name: Assign build.version.properties to env variable
run: cat site/updates/release/build.version.properties >> $GITHUB_ENV
- name: 'Zip artifacts ${{ env.build_version_full }} for Release'
uses: papeloto/action-zip@v1
with:
files: site/updates/release/${{ env.build_version_path }}
dest: EasyShell-${{ env.build_version_full }}.zip
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
prerelease: false
body: |
### Release build **${{ env.build_version_full }}**
All versions update site: `http://anb0s.github.io/EasyShell`
Exact version update site: `http://anb0s.github.io/EasyShell/release/${{ env.build_version_path }}`
Version: `EasyShell ${{ env.build_version_full }}`
**Use "Help | Install New Software...", paste the update site link and select the right version!**
[Milestone ${{ env.build_version_unqualified }}](https://github.com/anb0s/EasyShell/milestone/${{ env.build_version_milestone }}?closed=1)
files: EasyShell-${{ env.build_version_full }}.zip

0 comments on commit 8a8b5f0

Please sign in to comment.