Creates zip release

This commit is contained in:
Julien Lengrand-Lambert
2020-07-23 16:09:19 +02:00
parent 8410f66f27
commit 3a0526642b
2 changed files with 8 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ jobs:
run: mvn -B package
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: mkdir staging && cp cellar-app/target/cellar-app-jar-with-dependencies.jar staging
- run: mkdir staging && cp cellar-app/target/cellar-app.jar staging && cp cellar-app/target/libs staging
- uses: actions/upload-artifact@v2
with:
name: Package

View File

@@ -22,7 +22,10 @@ jobs:
servers: '[{"id": "github", "username": "jlengrand", "password": "${{ secrets.GITHUB_TOKEN }}"}]'
repositories: '[{ "id": "central2", "url": "https://repo1.maven.org/maven2" }, { "id": "github", "url": "https://maven.pkg.github.com/jlengrand/cellar-driver" }]'
- name: Build with Maven
run: mvn -B deploy
run: |
mvn -B package;
mkdir cellar-dist; cp -r cellar-app/target/libs cellar-dist; cp cellar-app/target/cellar-app.jar cellar-dist
zip -r cellar.zip cellar-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
@@ -42,6 +45,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./cellar-app/target/cellar-app-jar-with-dependencies.jar
asset_name: cellar-app-jar-with-dependencies.jar
asset_content_type: application/java-archive
asset_path: cellar.zip
asset_name: cellar.zip
asset_content_type: application/zip