Skip to content

Commit

Permalink
create tar artifact instead of zip
Browse files Browse the repository at this point in the history
  • Loading branch information
fr1kin committed Feb 20, 2022
1 parent 614048d commit 77a5895
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ jobs:
run: |
pushd build/libs
cp ${{ steps.exec.outputs.slimjar }} NiSCore-SLIM.jar
cp ${{ steps.exec.outputs.libszip }} NiSCore-libs.zip
cp ${{ steps.exec.outputs.libstar }} NiSCore-libs.tar.gz
cp ${{ steps.exec.outputs.fatjar }} NiSCore-FAT.jar
popd
- name: Create release if this is a tagged workflow
uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/')
with:
artifacts: build/libs/NiSCore-SLIM.jar,build/libs/NiSCore-libs.zip,build/libs/NiSCore-FAT.jar
artifacts: build/libs/NiSCore-SLIM.jar,build/libs/NiSCore-libs.tar.gz,build/libs/NiSCore-FAT.jar
name: NiSCore ${{ steps.exec.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ jar {
// into tasks.jar.destinationDirectory.dir("libs")
// }

finalizedBy task("zipLibs", type: Zip) {
finalizedBy task("tarLibs", type: Tar) {
archiveBaseName = "$archivesBaseName-libs"
archiveExtension = "tar.gz"
destinationDirectory = tasks.jar.destinationDirectory
compression = org.gradle.api.tasks.bundling.Compression.GZIP

from configurations.compileJar
}
Expand Down Expand Up @@ -146,7 +148,7 @@ task createGitHubActionsVars() {
onlyIf { isCiBuilding }
doFirst {
println "::set-output name=slimjar::${jar.archiveFileName.get()}"
println "::set-output name=libszip::${tasks.zipLibs.archiveFileName.get()}"
println "::set-output name=libstar::${tasks.tarLibs.archiveFileName.get()}"
println "::set-output name=fatjar::${fatJar.archiveFileName.get()}"
println "::set-output name=version::${project.version}"
}
Expand Down

0 comments on commit 77a5895

Please sign in to comment.