File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Build TLEscope
1+ name : Build and Release TLEscope
22
33on :
44 push :
55 branches : [ "main", "master" ]
6+ tags :
7+ - ' v*' # Triggers stable release on version tags
68 pull_request :
79 branches : [ "main", "master" ]
810
8890 with :
8991 name : TLEscope-Windows
9092 path : TLEscope-Windows/
91- retention-days : 14
93+ retention-days : 14
94+
95+ release :
96+ name : Publish Release
97+ needs : [build-linux, build-windows]
98+ # Only run on pushes to main/master or tag pushes (ignore pull requests)
99+ if : github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
100+ runs-on : ubuntu-latest
101+ permissions :
102+ contents : write
103+
104+ steps :
105+ - name : Download Artifacts
106+ uses : actions/download-artifact@v4
107+ with :
108+ path : artifacts
109+
110+ - name : Zip Artifacts for Release
111+ run : |
112+ cd artifacts
113+ zip -r ../TLEscope-Linux.zip TLEscope-Linux/
114+ zip -r ../TLEscope-Windows.zip TLEscope-Windows/
115+ cd ..
116+
117+ - name : Update Nightly Release
118+ if : github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
119+ uses : softprops/action-gh-release@v2
120+ with :
121+ tag_name : nightly
122+ name : " Nightly Build"
123+ body : " Automated nightly build reflecting the latest commit."
124+ prerelease : true
125+ files : |
126+ TLEscope-Linux.zip
127+ TLEscope-Windows.zip
128+
129+ - name : Publish Stable Release
130+ if : startsWith(github.ref, 'refs/tags/v')
131+ uses : softprops/action-gh-release@v2
132+ with :
133+ generate_release_notes : true
134+ files : |
135+ TLEscope-Linux.zip
136+ TLEscope-Windows.zip
You can’t perform that action at this time.
0 commit comments