Skip to content

Commit

Permalink
Add Jreleaser to GH Action
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <[email protected]>
  • Loading branch information
pditommaso committed Jun 4, 2023
1 parent 947189c commit 27ebc63
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 2 deletions.
45 changes: 43 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,47 @@ jobs:
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: wavelit-${{ matrix.os }}
path: ./app/build/native/nativeCompile/wavelit
name: nativeCompile-${{ matrix.os }}
path: ./app/build/native/nativeCompile
release:
name: Release
# if: "contains(github.event.head_commit.message, '[release]') && github.event.ref=='refs/heads/master'"
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Download all build artifacts
uses: actions/download-artifact@v2

- name: Setup Java for JReleaser
uses: actions/setup-java@v3
with:
java-version: 19
distribution: 'adopt'

- name: Version
id: version
run: |
VERSION=$(cat ./VERSION)
echo "VERSION=$VERSION"
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Run JReleaser
uses: jreleaser/release-action@v2
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_PROJECT_VERSION: ${{ steps.version.outputs.VERSION }}

- name: JReleaser release output
if: always()
uses: actions/upload-artifact@v3
with:
name: jreleaser-release
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
...
87 changes: 87 additions & 0 deletions jreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
project:
name: wavelit
description: Wavelit CLI
longDescription: Command line tool for Wave container provisioning
website: https://github.com/seqeralabs/wavelit
authors:
- Seqera Labs
license: MPL-2.0
extraProperties:
inceptionYear: 2023

release:
github:
overwrite: true
draft: true
prerelease:
pattern: .*-beta
changelog:
formatted: ALWAYS
format: '- {{commitShortHash}} {{commitTitle}}'
contributors:
format: '- {{contributorName}}{{#contributorUsernameAsLink}} ({{.}}){{/contributorUsernameAsLink}}'
labelers:
- label: 'feature'
title: 'Resolves #'
body: 'Resolves #'
- label: 'feature'
title: '[feature]'
- label: 'issue'
title: 'Fixes #'
body: 'Fixes #'
- label: 'issue'
title: 'Relates to #'
body: 'Relates to #'
- label: 'issue'
title: '[bug]'
- label: 'task'
title: '[task]'
- label: 'merge_pull'
title: 'Merge pull'
- label: 'merge_branch'
title: 'Merge branch'
- label: 'release'
title: '[release]'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- title: '✅ Issues'
labels:
- 'issue'
- title: '🧰 Tasks'
labels:
- 'task'
- title: 'Merge'
labels:
- 'merge_pull'
- 'merge_branch'
- title: 'Release'
labels:
- 'release'
hide:
categories:
- 'Merge'
- 'Release'
contributors:
- 'GitHub'
replacers:
- search: ' \[feature\]'
- search: ' \[bug\]'
- search: ' \[task\]'
- search: ' \[skip ci\]'
- search: ' \[release\]'

distributions:
wavelit:
type: NATIVE_IMAGE
artifacts:
- path: "nativeCompile-ubuntu-latest/wavelit"
transform: "{{distributionName}}-{{projectEffectiveVersion}}-linux-x86_64"
platform: linux-x86_64
- path: "nativeCompile-macos-latest/wavelit"
transform: "{{distributionName}}-{{projectEffectiveVersion}}-osx-x86_64"
platform: osx-x86_64
- path: "nativeCompile-windows-latest/wavelit.exe"
transform: "{{distributionName}}-{{projectEffectiveVersion}}-windows-x86_64.exe"
platform: windows-x86_64

0 comments on commit 27ebc63

Please sign in to comment.