add pipeline job for creating a release, update readme

This commit is contained in:
theopfr
2024-01-27 11:14:43 +01:00
parent 27276fb1d2
commit 59e9eaf050
2 changed files with 31 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
name: Build, Test and Release
name: Build, Test, Release
on:
push:
@@ -47,3 +47,30 @@ jobs:
with:
name: somo-${{ steps.version.outputs.version }}-${{ github.run_number }}-${{ github.sha }}.deb
path: target/debian/*.deb
release:
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.version.outputs.version }}
release_name: Release ${{ steps.version.outputs.version }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/debian/*.deb
asset_name: somo-${{ steps.version.outputs.version }}-${{ github.run_number }}-${{ github.sha }}.deb
asset_content_type: application/x-debian-package