update workflow

This commit is contained in:
joshuaboud 2021-06-23 17:04:05 -03:00
parent e9b80d5b4b
commit dc9b2ca853
No known key found for this signature in database
GPG Key ID: 17EFB59E2A8BF50E
2 changed files with 39 additions and 13 deletions

39
.github/workflows/build-packages.yml vendored Normal file
View File

@ -0,0 +1,39 @@
name: Build Packages
on:
push:
branches:
- build-package
tags:
- 'v*.*.*'
jobs:
publish:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Package Binaries
run: build-packages ${{github.repository}} ${{github.workspace}}
- name: Set Variables
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "PRERELEASE=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.prerelease')" >> $GITHUB_ENV
echo "TITLE=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.title')" >> $GITHUB_ENV
echo "VERSION=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.version')" >> $GITHUB_ENV
echo "REVISION=$(cat ${{github.workspace}}/manifest.json | jq --raw-output '.buildVersion')" >> $GITHUB_ENV
- name: Release
id: release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
name: ${{env.TITLE}} ${{env.VERSION}}-${{env.REVISION}}
prerelease: ${{env.PRERELEASE}}
body_path: ${{github.workspace}}/CHANGELOG.md
files: |
${{github.workspace}}/dist/deb/*.deb
${{github.workspace}}/dist/rpm/*/*.rpm
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Post-Release
if: startsWith(github.ref, 'refs/tags/')
run: echo ${{steps.release.outputs}}

View File

@ -1,13 +0,0 @@
name: Publish Packages
on:
push:
branches: [ build-package ]
jobs:
publish:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run Package script
run: /root/packaging_scripts/package.py ${{github.workspace}}