2021-06-23 22:04:05 +02:00
|
|
|
name: Build Packages
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- build-package
|
|
|
|
tags:
|
|
|
|
- 'v*.*.*'
|
|
|
|
jobs:
|
2021-06-30 16:35:22 +02:00
|
|
|
main:
|
2021-06-23 22:04:05 +02:00
|
|
|
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
|
2021-06-29 17:38:17 +02:00
|
|
|
- name: GitHub Release
|
2021-06-23 22:04:05 +02:00
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
2021-06-30 16:35:22 +02:00
|
|
|
name: ${{env.TITLE}} ${{env.VERSION}}
|
2021-06-23 22:04:05 +02:00
|
|
|
prerelease: ${{env.PRERELEASE}}
|
|
|
|
body_path: ${{github.workspace}}/CHANGELOG.md
|
|
|
|
files: |
|
2021-06-29 17:38:17 +02:00
|
|
|
${{github.workspace}}/dist/packages/*/*.deb
|
|
|
|
${{github.workspace}}/dist/packages/*/*.rpm
|
2021-07-15 19:28:24 +02:00
|
|
|
${{github.workspace}}/LICENSE
|
2021-06-23 22:04:05 +02:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
2021-06-29 20:03:15 +02:00
|
|
|
- name: Update Repository
|
2021-06-23 22:04:05 +02:00
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
2021-06-29 17:38:17 +02:00
|
|
|
run: update-repositories ${{github.workspace}}
|
2021-06-29 20:03:15 +02:00
|
|
|
- name: Publish Repository
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
2021-06-30 16:35:22 +02:00
|
|
|
run: publish-repo
|