From 3dad41693eab9dbd6d6914884cb2084623c21e96 Mon Sep 17 00:00:00 2001 From: nerdCopter <56646290+nerdCopter@users.noreply.github.com> Date: Wed, 24 Jun 2020 19:35:50 -0500 Subject: [PATCH] github actions upload to bintray (#292) * use tagging for uploading github builds to bintray * currently, tagging already produces github draft releases * use the following commands for triggering: ``` git checkout [branch|SHA] git tag descriptiveTagName #create local tag git push [upstream|origin] descriptiveTagName #push the tag to emuflight git tag --delete descriptiveTagName #delete the local tag git push --delete [upstream|origin] descriptiveTagName #delete the online tag (otherwise it will show in releases) ``` will produce something like: ![image](https://user-images.githubusercontent.com/56646290/85460556-f5020d00-b568-11ea-805f-ea23cfbb9ba1.png) --- .github/workflows/build.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ac02b8389..ce338415b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -88,6 +88,23 @@ jobs: name: EmuFlight-${{ steps.get_version.outputs.VERSION }}-${{ github.run_number }} path: obj/*.hex + # Upload to Bintray before .hex renames / only for tag + - name: Upload to Bintray + if: startsWith(github.ref, 'refs/tags/') + run: | + curl -fL https://getcli.jfrog.io | sh + export JFROG_CLI_OFFER_CONFIG=false + export CI=true + export JFROG_CLI_LOG_LEVEL=DEBUG + ./jfrog bt config --user=${{secrets.BINTRAYUSERNAME}} --key=${{secrets.BINTRAYAPIKEY}} --licenses=GPL-3.0 + export repo="emuflight-dev/dev_hex" + export package="${{steps.get_revtag.outputs.REVISION_TAG}}" + export version="${{github.run_number}}-${{steps.get_version.outputs.VERSION}}-${{steps.get_revtag.outputs.REVISION_TAG}}" + ./jfrog bt package-create --pub-dn=true --vcs-url="https://github.com/emuflight" "${repo}/${package}" || true + ./jfrog bt version-create "${repo}/${package}/${version}" || true + ./jfrog bt upload --publish=true "obj/*.hex" "${repo}/${package}/${version}" "GitHub_Build_${version}/" || true + continue-on-error: true + # Rename .hex for Releases - name: Rename Artifacts if: startsWith(github.ref, 'refs/tags/')