Skip to content

Commit

Permalink
updated github action maven flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Elias John committed Apr 2, 2020
1 parent 9d89430 commit 602d07e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 48 deletions.
45 changes: 35 additions & 10 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,45 @@ name: Java CI with Maven

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B package -DskipTests --file pom.xml
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B package -DskipTests --file pom.xml
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- 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: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
./target/Zettelkasten*.jar
./target/Zettelkasten*.exe
./target/Zettelkasten*.app
./target/Zettelkasten*.dmg
30 changes: 0 additions & 30 deletions .github/workflows/mavenpublish.yml

This file was deleted.

8 changes: 0 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@
</profile>
</profiles>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/sjPlot/Zettelkasten</url>
</repository>
</distributionManagement>

<build>
<sourceDirectory>src/main/java</sourceDirectory>
<testSourceDirectory>src/test/java</testSourceDirectory>
Expand Down

0 comments on commit 602d07e

Please sign in to comment.