File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ name: Build and Publish DEB Package
55on :
66 release :
77 types : [ released ]
8+ push :
9+ branches : [ "gh-build" ]
810 workflow_dispatch :
911 inputs :
1012 version :
2628 if [ "${{ github.event_name }}" = "release" ]; then
2729 version="${{ github.event.release.tag_name }}"
2830 version=${version#v} # Remove 'v' prefix if present
31+ elif [ "${{ github.event_name }}" = "push" ];then
32+ version="9.9.9" # Default version for push events (temporarily)
2933 else
3034 version="${{ github.event.inputs.version }}"
3135 fi
@@ -111,7 +115,7 @@ jobs:
111115 path : dist/chsrc_*.deb
112116 retention-days : 30
113117
114- - name : Upload to release
118+ - name : Upload to Releases (the newest release) if is release event
115119 if : github.event_name == 'release'
116120 uses : actions/upload-release-asset@v1
117121 env :
@@ -122,6 +126,20 @@ jobs:
122126 asset_name : chsrc_${{ steps.get_version.outputs.version }}-1_amd64.deb
123127 asset_content_type : application/vnd.debian.binary-package
124128
129+
130+ - name : Upload to Releases (the 'pre' release) if is push event
131+ if : github.event_name == 'push'
132+ uses : softprops/action-gh-release@v1
133+ with :
134+ tag_name : pre
135+ files : |
136+ dist/chsrc_*_amd64.deb
137+ token : ${{ secrets.UPLOAD_TO_GITHUB }}
138+
139+
140+
141+
142+
125143 create-repository-metadata :
126144 needs : build-deb
127145 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments