mirror of
https://github.com/theopfr/somo.git
synced 2025-06-10 01:33:32 +03:00
add pipeline job for creating a release, update readme
This commit is contained in:
29
.github/workflows/cicd.yml
vendored
29
.github/workflows/cicd.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user