mirror of
https://github.com/RubyMetric/chsrc
synced 2025-07-13 10:02:46 +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:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [ released ]
|
types: [ released ]
|
||||||
|
push:
|
||||||
|
branches: [ "gh-build" ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
@ -26,6 +28,8 @@ jobs:
|
|||||||
if [ "${{ github.event_name }}" = "release" ]; then
|
if [ "${{ github.event_name }}" = "release" ]; then
|
||||||
version="${{ github.event.release.tag_name }}"
|
version="${{ github.event.release.tag_name }}"
|
||||||
version=${version#v} # Remove 'v' prefix if present
|
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
|
else
|
||||||
version="${{ github.event.inputs.version }}"
|
version="${{ github.event.inputs.version }}"
|
||||||
fi
|
fi
|
||||||
@ -111,7 +115,7 @@ jobs:
|
|||||||
path: dist/chsrc_*.deb
|
path: dist/chsrc_*.deb
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
|
||||||
- name: Upload to release
|
- name: Upload to Releases (the newest release) if is release event
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
@ -122,6 +126,20 @@ jobs:
|
|||||||
asset_name: chsrc_${{ steps.get_version.outputs.version }}-1_amd64.deb
|
asset_name: chsrc_${{ steps.get_version.outputs.version }}-1_amd64.deb
|
||||||
asset_content_type: application/vnd.debian.binary-package
|
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:
|
create-repository-metadata:
|
||||||
needs: build-deb
|
needs: build-deb
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user