2021-11-08 11:33:09 +05:30
|
|
|
name: Release General
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
name: Create GitHub release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
outputs:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
release_id: ${{ steps.create_release.outputs.id }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Extract ChangeLog entry ...
|
|
|
|
# Hack to extract latest entry for body_path below
|
|
|
|
run: |
|
|
|
|
awk '/-----*/{if (x == 1) exit; x=1;next}x' ChangeLog.md \
|
|
|
|
|head -n -1 > release.md
|
|
|
|
cat release.md
|
|
|
|
- name: Create release ...
|
|
|
|
id: create_release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ github.ref }}
|
|
|
|
release_name: sysklogd ${{ github.ref }}
|
|
|
|
body_path: release.md
|
|
|
|
draft: false
|
|
|
|
prerelease: false
|
|
|
|
tarball:
|
|
|
|
name: Build and upload release tarball
|
|
|
|
needs: release
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Installing dependencies ...
|
|
|
|
run: |
|
2021-11-22 09:28:16 +05:30
|
|
|
sudo apt-get -y update
|
|
|
|
sudo apt-get -y install tree tshark
|
2021-11-08 11:33:09 +05:30
|
|
|
- name: Creating Makefiles ...
|
|
|
|
run: |
|
|
|
|
./autogen.sh
|
2021-11-22 07:58:33 +05:30
|
|
|
./configure --prefix=/tmp --with-systemd=/tmp/lib/systemd/system
|
2021-11-08 11:33:09 +05:30
|
|
|
- name: Build release ...
|
|
|
|
run: |
|
2021-11-22 08:09:27 +05:30
|
|
|
make release || (cat sysklogd-2.3.0/_build/sub/test/start.log; cat sysklogd-2.3.0/_build/sub/test/remote.log; false)
|
2021-11-08 11:33:09 +05:30
|
|
|
ls -lF ../
|
|
|
|
mkdir -p artifacts/
|
|
|
|
mv ../*.tar.* artifacts/
|
|
|
|
- name: Upload release artifacts ...
|
|
|
|
uses: skx/github-action-publish-binaries@release-0.15
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
releaseId: ${{ needs.release.outputs.release_id }}
|
|
|
|
args: artifacts/*
|