Skip to content

Commit

Permalink
On release build: Upload release assets.
Browse files Browse the repository at this point in the history
  • Loading branch information
bionade24 committed May 8, 2022
1 parent 43b5021 commit c381700
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- master
release:
types:
- published

jobs:
clang-format-checking:
Expand Down Expand Up @@ -54,16 +55,8 @@ jobs:
name: rpms
path: RPMS

- name: Create release
if: contains(github.ref, 'release')
run: |
set -x
assets=()
for asset in RPMS/*.rpm; do
assets+=("-a" "$asset")
done
tag_name="${GITHUB_REF##*/}"
hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload release assets
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: RPMS/*

0 comments on commit c381700

Please sign in to comment.