From 423a3909cf4ebc5d8480871851ac452230ef327b Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Tue, 21 Apr 2020 12:28:09 +0200 Subject: Update gradle.yml --- .github/workflows/gradle.yml | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to '.github') diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index a3522b0..88d5241 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,13 +1,12 @@ # This workflow will build a Java project with Gradle # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle -name: Java CI with Gradle - +name: Upload release 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: @@ -26,9 +25,23 @@ jobs: run: ./gradlew remapJar - name: Remove intermediary JAR run: rm build/libs/parquet*-dev.jar - - name: Upload to release - uses: JasonEtco/upload-to-release@master + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - args: build/lib/parquet*.jar + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: true + - 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 }} # 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: ./libs/build/parquet*.jar + asset_name: parquet-${{ github.ref }}.jar + asset_content_type: application/jar -- cgit v1.2.3