Skip to content

Commit

Permalink
Add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
recke96 committed Mar 15, 2024
1 parent 9949f9b commit 5a01175
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
security-events: write

jobs:
build:
check:
runs-on: "ubuntu-latest"
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Release

on:
workflow_dispatch:
inputs:
bump:
description: Which part of the version to bump
required: true
default: patch
type: choice
options:
- patch
- minor
- major

jobs:
package:
strategy:
matrix:
variant:
- { os: windows-latest, package: exe }
- { os: ubuntu-latest, package: deb }
runs-on: ${{ matrix.variant.os }}
steps:
- uses: actions/checkout@v4
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
- name: Build & Package
run: ./gradlew packageDistributionForCurrentOS
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.variant.package }}
path: ${{ github.workspace }}/desktop-app/build/compose/binaries/main/${{ matrix.variant.package }}/*.${{ matrix.variant.package }}

release:
needs: [package]
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: ${{ github.workspace }}/packages
- name: Display
run: ls -R ${{ github.workspace }}
- id: release
name: Create Release
uses: rymndhng/[email protected]
with:
name: HEMAtoma <RELEASE_VERSION>
bump_version_scheme: ${{ inputs.bump }}
use_github_release_notes: true
- name: Upload Release Artifacts
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.release.outputs.tag_name }}
files: |
${{ github.workspace }}/packages/*.deb
${{ github.workspace }}/packages/*.exe

0 comments on commit 5a01175

Please sign in to comment.