Skip to content

Commit

Permalink
Merge pull request #8 from TheDudeFromCI/libraries-in-releases
Browse files Browse the repository at this point in the history
Releases now upload libraries.
  • Loading branch information
TheDudeFromCI authored Jan 30, 2020
2 parents b4ace73 + 26fd3a8 commit 1b26212
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ on:
- ".github/**"
pull_request:
paths:
- "*"
- "**.java"
- "pom.xml"
- ".github/**"

jobs:
build:
Expand All @@ -28,9 +30,8 @@ jobs:
${{ runner.os }}-maven-
- name: Build with Maven
uses: xlui/action-maven-cli/jdk8@master
with:
args: -B clean javadoc:jar test jacoco:report sonar:sonar
run: |
mvn -B clean javadoc:jar test jacoco:report sonar:sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down Expand Up @@ -96,18 +97,25 @@ jobs:
- name: Create Zip Release
run: |
cp target/wraithengine-*.jar dist
cd dist
zip build *
cd ..
zip -j build target/wraithengine-*.jar
zip -j lib target/lib/*.jar
- name: Upload Release Zip
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/build.zip
asset_path: ./build.zip
asset_name: build_${{ steps.build_number.outputs.build_number }}.zip
asset_content_type: application/zip

- name: Upload Libraries Zip
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./lib.zip
asset_name: build_${{ steps.build_number.outputs.build_number }}_lib.zip
asset_content_type: application/zip
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>dist/lib</outputDirectory>
<outputDirectory>target/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
Expand Down

0 comments on commit 1b26212

Please sign in to comment.