-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0732f8f
commit 8d822f5
Showing
4 changed files
with
23 additions
and
24 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 |
---|---|---|
|
@@ -30,45 +30,37 @@ env: | |
JAVA_DISTRO: 'zulu' | ||
|
||
jobs: | ||
precheck: | ||
name: Precheck | ||
runs-on: ubuntu-latest | ||
outputs: | ||
VERSION: ${{ steps.vars.outputs.VERSION }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cancel previous run | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
release: | ||
name: Release | ||
needs: [precheck] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Cancel previous run | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: ${{ env.JAVA_VERSION }} | ||
distribution: ${{ env.JAVA_DISTRO }} | ||
cache: gradle | ||
|
||
- name: Set release version | ||
- name: Version | ||
id: vars | ||
shell: bash | ||
run: | | ||
VERSION=${{ github.event.inputs.version }} | ||
echo $VERSION > VERSION | ||
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT | ||
echo ${{ github.event.inputs.version }} > VERSION | ||
git add VERSION | ||
sed -i -e "s/^\:project-version\:\ .*/:project-version: ${{ needs.precheck.outputs.VERSION }}/g" README.adoc | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "GitHub Action" | ||
git commit -a -m "Releasing version $VERSION" | ||
sed -i -e "s/^\:project-version\:\ .*/:project-version: ${{ github.event.inputs.version }}/g" README.adoc | ||
git config --global user.email "${{ secrets.COMMIT_EMAIL }}" | ||
git config --global user.name "Andres Almiray" | ||
git commit -a -m "Releasing version ${{ github.event.inputs.version }}" | ||
git push origin master | ||
- name: Deploy | ||
|
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
3.1.0-SNAPSHOT | ||
3.1.0 |
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