Skip to content

Commit

Permalink
add github actions workflow to create release
Browse files Browse the repository at this point in the history
  • Loading branch information
hpcsc committed Dec 29, 2019
1 parent 363585c commit 0fb0f5d
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Pipeline
on: [push]
name: Master Build and Publish
on:
push:
branches:
- master
jobs:

build:
Expand Down Expand Up @@ -36,8 +39,8 @@ jobs:
name: aws-profile-${{runner.os}}-${{github.sha}}
path: ./bin/aws-profile-${{runner.os}}-${{github.sha}}

release:
name: Publish
publish:
name: Publish to Bintray
runs-on: ubuntu-18.04
needs: build
steps:
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release
on:
push:
tags:
- "*"

jobs:
release:
name: Create Github Release
runs-on: ubuntu-18.04
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false

- name: Download binaries from Bintray
run: curl --remote-name-all -Lf https://dl.bintray.com/hpcsc/aws-profile/aws-profile-{Linux,Windows,macOS}-${{github.sha}}

- name: Attach Linux binary to Github release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./aws-profile-Linux-${{github.sha}}
asset_name: aws-profile-linux
asset_content_type: application/octet-stream

- name: Attach Windows binary to Github release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./aws-profile-Windows-${{github.sha}}
asset_name: aws-profile-windows.exe
asset_content_type: application/octet-stream

- name: Attach MacOS binary to Github release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./aws-profile-macOS-${{github.sha}}
asset_name: aws-profile-macos
asset_content_type: application/octet-stream

0 comments on commit 0fb0f5d

Please sign in to comment.