Skip to content

Commit

Permalink
build: Update release configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Jun 5, 2024
1 parent 044b8fc commit 23e8b0c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/early-access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
env:
JAVA_VERSION: '11'
JAVA_DISTRO: 'zulu'

jobs:
earlyaccess:
name: EarlyAccess
Expand Down
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
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.json
version: 8
tags:
- 'json'
- 'xml'

release:
github:
Expand Down

0 comments on commit 23e8b0c

Please sign in to comment.