Skip to content

Commit

Permalink
Create release and upload asset
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson committed Jun 12, 2020
1 parent 528ecde commit cf8dcdc
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Build

on:
push:
branches: [ master ]
tags:
- 'v*'
pull_request:
branches: [ master ]

name: Build

jobs:

build:
Expand All @@ -31,7 +33,31 @@ jobs:
working-directory: openvpn

- name: Upload artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v2
with:
name: openvpn-linux-amd64.tar.gz
path: openvpn/openvpn-linux-amd64.tar.gz

- name: Create Release
if: startsWith(github.ref, 'refs/tags/v')
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: Upload Release Asset
if: startsWith(github.ref, 'refs/tags/v')
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 }}
asset_path: openvpn/openvpn-linux-amd64.tar.gz
asset_name: openvpn-linux-amd64.tar.gz.zip
asset_content_type: application/zip

0 comments on commit cf8dcdc

Please sign in to comment.