Skip to content

Commit

Permalink
github actions upload to bintray (#292)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
nerdCopter authored Jun 25, 2020
1 parent 0017782 commit 3dad416
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/')
Expand Down

0 comments on commit 3dad416

Please sign in to comment.