mirror of
https://github.com/RubyMetric/chsrc
synced 2025-07-13 01:42:51 +08:00
parent
d4e1e7dd37
commit
ebbe2521bc
20
.github/workflows/pkg-deb.yml
vendored
20
.github/workflows/pkg-deb.yml
vendored
@ -5,6 +5,8 @@ name: Build and Publish DEB Package
|
||||
on:
|
||||
release:
|
||||
types: [ released ]
|
||||
push:
|
||||
branches: [ "gh-build" ]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
@ -26,6 +28,8 @@ jobs:
|
||||
if [ "${{ github.event_name }}" = "release" ]; then
|
||||
version="${{ github.event.release.tag_name }}"
|
||||
version=${version#v} # Remove 'v' prefix if present
|
||||
elif [ "${{ github.event_name }}" = "push" ];then
|
||||
version="9.9.9" # Default version for push events (temporarily)
|
||||
else
|
||||
version="${{ github.event.inputs.version }}"
|
||||
fi
|
||||
@ -111,7 +115,7 @@ jobs:
|
||||
path: dist/chsrc_*.deb
|
||||
retention-days: 30
|
||||
|
||||
- name: Upload to release
|
||||
- name: Upload to Releases (the newest release) if is release event
|
||||
if: github.event_name == 'release'
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
@ -122,6 +126,20 @@ jobs:
|
||||
asset_name: chsrc_${{ steps.get_version.outputs.version }}-1_amd64.deb
|
||||
asset_content_type: application/vnd.debian.binary-package
|
||||
|
||||
|
||||
- name: Upload to Releases (the 'pre' release) if is push event
|
||||
if: github.event_name == 'push'
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: pre
|
||||
files: |
|
||||
dist/chsrc_*_amd64.deb
|
||||
token: ${{ secrets.UPLOAD_TO_GITHUB }}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
create-repository-metadata:
|
||||
needs: build-deb
|
||||
runs-on: ubuntu-latest
|
||||
|
Loading…
x
Reference in New Issue
Block a user