.github: bump version of actions for Node.js upgrade

This also refactors the release job to use ncipollo/release-action@v1
instead of the deprecated actions/create-release@v1

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg 2023-04-22 09:18:07 +02:00
parent 8768f9246b
commit 0cde7cbcc5
3 changed files with 15 additions and 40 deletions

View File

@ -28,7 +28,7 @@ jobs:
run: | run: |
sudo apt-get -y update sudo apt-get -y update
sudo apt-get -y install tree tshark valgrind sudo apt-get -y install tree tshark valgrind
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Configure - name: Configure
run: | run: |
set -x set -x

View File

@ -15,8 +15,8 @@ jobs:
coverity: coverity:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/cache@v2 - uses: actions/cache@v3
id: coverity-toolchain-cache id: coverity-toolchain-cache
with: with:
path: cov-analysis-linux64 path: cov-analysis-linux64
@ -53,7 +53,7 @@ jobs:
--form description="${PROJECT_NAME} $(git rev-parse HEAD)" \ --form description="${PROJECT_NAME} $(git rev-parse HEAD)" \
https://scan.coverity.com/builds?project=${COVERITY_PROJ} https://scan.coverity.com/builds?project=${COVERITY_PROJ}
- name: Upload build.log - name: Upload build.log
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v3
with: with:
name: coverity-build.log name: coverity-build.log
path: cov-int/build-log.txt path: cov-int/build-log.txt

View File

@ -7,38 +7,11 @@ on:
jobs: jobs:
release: 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 name: Build and upload release tarball
needs: release
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Installing dependencies ... - name: Installing dependencies ...
run: | run: |
sudo apt-get -y update sudo apt-get -y update
@ -49,14 +22,16 @@ jobs:
./configure --prefix=/tmp --with-systemd=/tmp/lib/systemd/system ./configure --prefix=/tmp --with-systemd=/tmp/lib/systemd/system
- name: Build release ... - name: Build release ...
run: | run: |
make release || (cat sysklogd-2.3.0/_build/sub/test/start.log; cat sysklogd-2.3.0/_build/sub/test/remote.log; false) make release
ls -lF ../
mkdir -p artifacts/ mkdir -p artifacts/
mv ../*.tar.* artifacts/ mv ../*.tar.* artifacts/
- name: Upload release artifacts ... - name: Extract ChangeLog entry ...
uses: skx/github-action-publish-binaries@release-0.15 run: |
env: awk '/-----*/{if (x == 1) exit; x=1;next}x' ChangeLog.md \
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |head -n -1 > release.md
cat release.md
- uses: ncipollo/release-action@v1
with: with:
releaseId: ${{ needs.release.outputs.release_id }} name: sysklogd ${{ github.ref_name }}
args: artifacts/* bodyFile: "release.md"
artifacts: "artifacts/*"