Skip to content

Commit

Permalink
build: Update release configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and aalmiray committed Jun 5, 2024
1 parent 0732f8f commit 8d822f5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
36 changes: 14 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:project-name: ezmorph
:project-group: org.kordamp.ezmorph
:project-artifactId: ezmorph-core
:project-version: 3.0.0
:project-version: 3.1.0

image:https://img.shields.io/github/actions/workflow/status/{project-owner}/{project-name}/early-access.yml?branch=master&logo=github&label=Build["Build Status", link="https://github.com/{project-owner}/{project-name}/actions"]
image:https://img.shields.io/maven-central/v/{project-group}/{project-artifactId}?logo=apache%20maven[Download, link="https://search.maven.org/#search|ga|1|g:{project-group} AND a:{project-artifactId}"]
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.0-SNAPSHOT
3.1.0
7 changes: 7 additions & 0 deletions jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ project:
license: Apache-2.0
inceptionYear: 2006
stereotype: NONE
vendor: Kordamp
java:
groupId: org.kordamp.ezmorph
version: 8
tags:
- 'pojo'
- 'convert'

release:
github:
Expand Down

0 comments on commit 8d822f5

Please sign in to comment.