Skip to content

Commit

Permalink
Merge pull request #63 from cosmos-gaminghub/feature/add-release-work…
Browse files Browse the repository at this point in the history
…flow

add release workflow
  • Loading branch information
EG-easy authored Jan 21, 2022
2 parents fa8c85d + 5556c09 commit f80d3a6
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Upload Release Asset
on:
push:
tags:
- 'v*'
jobs:
build:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build project
run: |
make all
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Set version
id: tag_version
run: |
VERSION=$(echo ${{ github.ref }} | sed -e "s#refs/tags/##g")
echo ::set-output name=version::$VERSION
- name: Upload Release Asset
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: build/exporter
asset_name: exporter-${{ steps.tag_version.outputs.version }}
asset_content_type: application/octet-stream

0 comments on commit f80d3a6

Please sign in to comment.