Skip to content

Commit

Permalink
Merge branch '52'
Browse files Browse the repository at this point in the history
  • Loading branch information
kaibadash committed May 3, 2020
2 parents 500b411 + 18bc433 commit 5814f00
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 8 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/package_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- 43

jobs:
build:
Expand All @@ -22,8 +21,8 @@ jobs:
- name: Build with Gradle
run: ./gradlew shadowJar
- name: Build installer
run: jpackage --main-class com.pokosho.midi2musicxml.MainKt -i build/libs -n midi2musicxml --main-jar midi2musicxml.jar --icon build/resources/main/crab.icns --app-version 0.0.1
run: jpackage --main-class com.pokosho.midi2musicxml.MainKt -i build/libs -n midi2musicxml --main-jar midi2musicxml.jar --icon build/resources/main/crab.icns
- uses: actions/upload-artifact@v1
with:
name: Package_${{ matrix.os }}
path: midi2musicxml-0.0.1.dmg
path: build/libs/midi2musicxml.jar
2 changes: 0 additions & 2 deletions .github/workflows/package_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- hotfix/windows_readme

jobs:
build:
Expand All @@ -24,7 +23,6 @@ jobs:
- name: Copy
run: copy build\libs\midi2musicxml*.jar windows_script\


# A installer needs WIX tool. I was not able to build with GitHub Actions...
- uses: actions/upload-artifact@v1
with:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/release_mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: release_mac

on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]

steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 14
- name: Get tag
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF:10}
- name: Build with Gradle
run: ./gradlew shadowJar
- name: Build installer
run: jpackage --main-class com.pokosho.midi2musicxml.MainKt -i build/libs -n midi2musicxml --main-jar midi2musicxml.jar --icon build/resources/main/crab.icns --app-version ${{ env.RELEASE_VERSION }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./midi2musicxml-${{ env.RELEASE_VERSION }}.dmg
asset_name: midi2musicxml_mac.zip
asset_content_type: application/zip
54 changes: 54 additions & 0 deletions .github/workflows/release_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: release_windows

on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]

steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 14
- name: Build with Gradle
run: ./gradlew shadowJar
- name: Copy
run: copy build\libs\midi2musicxml*.jar windows_script\

# A installer needs WIX tool. I was not able to build with GitHub Actions...
- uses: actions/upload-artifact@v1
with:
name: Package_${{ matrix.os }}
path: windows_script

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}_windows
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Zip
run: powershell compress-archive windows_script/* midi2musicxml_windows.zip

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./midi2musicxml_windows.zip
asset_name: midi2musicxml_windows.zip
asset_content_type: application/zip
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ output/*
src/test/resources/test*.musicxml
sample/*.musicxml
tmp/*
midi2musicxml*dmg
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,17 @@ OPTIONS

![image](https://user-images.githubusercontent.com/391549/80907978-9aadb280-8d56-11ea-881b-74c176cd01a8.png)

## Download
## Download and Setup

WIP: You can get an executable jar from [CI](https://github.com/kaibadash/midi2musicxml/actions?query=workflow%3Apackage).
You can download from [release page](https://github.com/kaibadash/midi2musicxml/releases).

### Mac

Just install it.

### Windows

[Read me](https://github.com/kaibadash/midi2musicxml/blob/master/windows_script/README.md)

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
}

group = "com.pokosho.midi2musicxml"
version = "0.0.1-SNAPSHOT"
version = "0.0.2"
java.sourceCompatibility = JavaVersion.VERSION_1_8

val javafxVersion = "11.0.2"
Expand Down

0 comments on commit 5814f00

Please sign in to comment.