forked from jverein/jverein
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/GitHub workflow release (#83)
* Feature: GitHub Actions für CI #39 * Add build.xml * Remove token for checkout, set action versions * Use: softprops/action-gh-release --------- Co-authored-by: dippeal <[email protected]>
- Loading branch information
Showing
5 changed files
with
360 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# This workflow will build a Java project with Ant | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant | ||
|
||
name: openjverein nightly release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags-ignore: | ||
- '**' | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
build: | ||
name: Building release and upload to branch | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up JDK 11 for x64 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
architecture: x64 | ||
|
||
- name: Check out jameica | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: willuhn/jameica | ||
path: jameica | ||
|
||
- name: Build jameica nightly | ||
working-directory: ./ | ||
run: ant -noinput -buildfile jameica/build/build.xml nightly | ||
|
||
- name: Check out hibiscus | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: willuhn/hibiscus | ||
path: hibiscus | ||
|
||
- name: Build hibiscus nightly | ||
working-directory: ./ | ||
run: ant -noinput -buildfile hibiscus/build/build.xml nightly | ||
|
||
- name: Checkout openjverein | ||
id: openjverein_checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: jverein | ||
|
||
- name: Build openjverein plugin | ||
id: openjverein | ||
working-directory: ./ | ||
run: | | ||
ant_output=$(ant -e -q -noinput -buildfile jverein/build/build.xml nightly) | ||
echo $ant_output | ||
ssa="SELECTED_VERSION=" | ||
ssb=".zip" | ||
text="${ant_output#*${ssa}}" | ||
text="${text%${ssb}*}.zip" | ||
tmp_version=$(echo $text | sed -rn 's/^([^[:blank:]]*).*$/\1/p') | ||
tmp_version=$tmp_version | ||
ssa="SELECTED_FILENAME=" | ||
text="${ant_output#*${ssa}}" | ||
text="${text%${ssb}*}.zip" | ||
tmp_filename=$(echo $text | sed -rn 's/^([^[:blank:]]*).*$/\1/p') | ||
ssa="SELECTED_PATH=" | ||
text="${ant_output#*${ssa}}" | ||
text="${text%${ssb}*}.zip" | ||
tmp_path=$(echo $text | sed -rn 's/^([^[:blank:]]*).*$/\1/p') | ||
echo "selected_version=${tmp_version}" >> $GITHUB_OUTPUT | ||
echo "selected_filename=$tmp_filename" >> $GITHUB_OUTPUT | ||
echo "selected_path=$tmp_path" >> $GITHUB_OUTPUT | ||
builddatetime=$(date +'%Y-%m-%d %H:%M') | ||
echo "### Version: $tmp_version | filename: $tmp_filename | build datetime: $builddatetime" >> $GITHUB_STEP_SUMMARY | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ steps.openjverein.outputs.selected_version }} | ||
prerelease: true | ||
name: Release ${{ steps.openjverein.outputs.selected_version }} | ||
files: ./jverein/${{ steps.openjverein.outputs.selected_path }} | ||
generate_release_notes: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# This workflow will build a Java project with Ant | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant | ||
|
||
name: openjverein official release | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
name: Building release and upload to branch | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up JDK 11 for x64 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
architecture: x64 | ||
|
||
- name: Check out jameica | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: willuhn/jameica | ||
path: jameica | ||
|
||
- name: Build jameica nightly | ||
working-directory: ./ | ||
run: ant -noinput -buildfile jameica/build/build.xml nightly | ||
|
||
- name: Check out hibiscus | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: willuhn/hibiscus | ||
path: hibiscus | ||
|
||
- name: Build hibiscus nightly | ||
working-directory: ./ | ||
run: ant -noinput -buildfile hibiscus/build/build.xml nightly | ||
|
||
- name: Checkout openjverein | ||
id: openjverein_checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
path: jverein | ||
|
||
- name: Build openjverein plugin | ||
id: openjverein | ||
working-directory: ./ | ||
run: | | ||
ant_output=$(ant -e -q -noinput -buildfile jverein/build/build.xml) | ||
echo $ant_output | ||
ssa="SELECTED_VERSION=" | ||
ssb=".zip" | ||
text="${ant_output#*${ssa}}" | ||
text="${text%${ssb}*}.zip" | ||
tmp_version=$(echo $text | sed -rn 's/^([^[:blank:]]*).*$/\1/p') | ||
tmp_version=$tmp_version | ||
ssa="SELECTED_FILENAME=" | ||
text="${ant_output#*${ssa}}" | ||
text="${text%${ssb}*}.zip" | ||
tmp_filename=$(echo $text | sed -rn 's/^([^[:blank:]]*).*$/\1/p') | ||
ssa="SELECTED_PATH=" | ||
text="${ant_output#*${ssa}}" | ||
text="${text%${ssb}*}.zip" | ||
tmp_path=$(echo $text | sed -rn 's/^([^[:blank:]]*).*$/\1/p') | ||
echo "selected_version=${tmp_version}" >> $GITHUB_OUTPUT | ||
echo "selected_filename=$tmp_filename" >> $GITHUB_OUTPUT | ||
echo "selected_path=$tmp_path" >> $GITHUB_OUTPUT | ||
builddatetime=$(date +'%Y-%m-%d %H:%M') | ||
echo "### Version: $tmp_version | filename: $tmp_filename | build datetime: $builddatetime" >> $GITHUB_STEP_SUMMARY | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ steps.openjverein.outputs.selected_version }} | ||
prerelease: false | ||
name: Release ${{ steps.openjverein.outputs.selected_version }} | ||
files: ./jverein/${{ steps.openjverein.outputs.selected_path }} | ||
generate_release_notes: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.