Merge pull request #249 from btdex/feat/dynamic-remote-resources #73
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
name: Draft Release | |
jobs: | |
build: | |
name: Create Release Draft | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@master | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Build All | |
run: ./gradlew release | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1.0.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: true | |
prerelease: false | |
- name: Get the version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- name: Get the version number | |
id: get_version_number | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- name: Upload Release Asset - Jar | |
id: upload-release-asset-jar | |
uses: actions/upload-release-asset@v1.0.1 | |
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: ./build/libs/btdex-all.jar | |
asset_name: btdex-${{ steps.get_version.outputs.VERSION }}-all.jar | |
asset_content_type: application/java-archive | |
- name: Upload Release Asset - Jar checksum | |
id: upload-release-asset-jar-checksum | |
uses: actions/upload-release-asset@v1.0.1 | |
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: ./build/checksums/btdex-all.jar.sha256 | |
asset_name: btdex-${{ steps.get_version.outputs.VERSION }}-all.jar.sha256 | |
asset_content_type: text/plain | |
- name: Upload Release Asset - Windows Exe | |
id: upload-release-asset-windows | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./build/launch4j/btdex.exe | |
asset_name: btdex-${{ steps.get_version.outputs.VERSION }}-win.exe | |
asset_content_type: application/vnd.microsoft.portable-executable | |
- name: Upload Release Asset - Windows exe checksum | |
id: upload-release-asset-win-checksum | |
uses: actions/upload-release-asset@v1.0.1 | |
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: ./build/checksums/btdex.exe.sha256 | |
asset_name: btdex-${{ steps.get_version.outputs.VERSION }}-win.exe.sha256 | |
asset_content_type: text/plain | |
# - name: Upload Release Asset - Windows Installer | |
# id: upload-release-asset-windows-installer | |
# uses: actions/upload-release-asset@v1.0.1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} | |
# asset_path: ./dist/btdex-installer-win_x64.exe | |
# asset_name: btdex-installer-${{ steps.get_version.outputs.VERSION }}-win_x64.exe | |
# asset_content_type: application/vnd.microsoft.portable-executable | |
# - name: Upload Release Asset - Windows installer checksum | |
# id: upload-release-asset-win-installer-checksum | |
# uses: actions/upload-release-asset@v1.0.1 | |
# 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: ./build/checksums/btdex-intaller-win_x64.exe.sha256 | |
# asset_name: btdex-installer=${{ steps.get_version.outputs.VERSION }}-win_x64.exe.sha256 | |
# asset_content_type: text/plain | |
- name: Upload Release Asset - App | |
id: upload-release-asset-app | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./build/distributions/btdex-macosx_x64.zip | |
asset_name: btdex-${{ steps.get_version.outputs.VERSION }}-macosx_x64.zip | |
asset_content_type: application/zip | |
- name: Upload Release Asset - App checksum | |
id: upload-release-asset-app-checksum | |
uses: actions/upload-release-asset@v1.0.1 | |
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: ./build/checksums/btdex-macosx_x64.zip.sha256 | |
asset_name: btdex-${{ steps.get_version.outputs.VERSION }}-macosx_x64.zip.sha256 | |
asset_content_type: text/plain | |
- name: Extract version number | |
id: get-version-num | |
run: | | |
id=$(echo ${{ steps.get_version.outputs.VERSION }} | cut -c2-) | |
echo "::set-output name=id::$id" | |
- name: Upload Release Asset - Deb | |
id: upload-release-asset-deb | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./build/distributions/btdex_${{steps.get-version-num.outputs.id}}-1_amd64.deb | |
asset_name: btdex_${{steps.get-version-num.outputs.id}}-1_amd64.deb | |
asset_content_type: application/vnd.debian.binary-package |