2020 runs-on : windows-latest
2121 steps :
2222 - name : Checkout code
23- uses : actions/checkout@v4
23+ uses : actions/checkout@v5
2424 with :
2525 fetch-depth : 0
2626 ref : ' ${{ github.ref }}'
3232 echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV
3333
3434 - name : Setup .NET
35- uses : actions/setup-dotnet@v4
35+ uses : actions/setup-dotnet@v5
3636 with :
3737 dotnet-version : ' 6.0.x'
3838
5353 tar -czvf win-builds.tgz --exclude='*.pdb' *
5454
5555 - name : Upload build archive
56- uses : actions/upload-artifact@v4
56+ uses : actions/upload-artifact@v6
5757 with :
5858 name : win-builds
5959 path : ${{ env.PUBLISH_DIR }}/win-builds.tgz
6464 runs-on : macos-latest
6565 steps :
6666 - name : Checkout code
67- uses : actions/checkout@v4
67+ uses : actions/checkout@v5
6868 with :
6969 fetch-depth : 0
7070 ref : ' ${{ github.ref }}'
7676 echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV
7777
7878 - name : Setup .NET
79- uses : actions/setup-dotnet@v4
79+ uses : actions/setup-dotnet@v5
8080 with :
8181 dotnet-version : ' 6.0.x'
8282
@@ -97,18 +97,19 @@ jobs:
9797 tar -czvf mac-builds.tgz --exclude='*.pdb' *
9898
9999 - name : Upload build archive
100- uses : actions/upload-artifact@v4
100+ uses : actions/upload-artifact@v6
101101 with :
102102 name : mac-builds
103103 path : ${{ env.PUBLISH_DIR }}/mac-builds.tgz
104104 retention-days : 5
105105
106- build-android :
107- name : Android build
106+ package_release :
107+ name : Linux/Android builds, package and release
108+ needs : [build-win, build-mac]
108109 runs-on : ubuntu-latest
109110 steps :
110111 - name : Checkout code
111- uses : actions/checkout@v4
112+ uses : actions/checkout@v5
112113 with :
113114 fetch-depth : 0
114115 ref : ' ${{ github.ref }}'
@@ -119,13 +120,24 @@ jobs:
119120 echo "VERSION=$(echo ${{ github.ref_name }} | cut -c 2-)" >> $GITHUB_ENV
120121 echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV
121122
123+ - name : Create directories
124+ shell : bash
125+ run : |
126+ mkdir -p "$OUTPUT_DIR"
127+ mkdir -p "$PUBLISH_DIR"
128+
129+ - name : Install utilities
130+ # zip for packaging windows builds
131+ # nsis for windows installer
132+ run : sudo apt-get update && sudo apt-get install zip nsis
133+
122134 - name : Setup .NET 10
123- uses : actions/setup-dotnet@v4
135+ uses : actions/setup-dotnet@v5
124136 with :
125137 dotnet-version : ' 10.0.x'
126138
127139 - name : Setup Java
128- uses : actions/setup-java@v4
140+ uses : actions/setup-java@v5
129141 with :
130142 distribution : temurin
131143 java-version : ' 17'
@@ -136,81 +148,22 @@ jobs:
136148 dotnet workload install android
137149 dotnet workload list
138150
139- - name : Build Android
140- shell : bash
141- run : |
142- dotnet build Knossos.NET.Android/Knossos.NET.Android.csproj -c Release -p:BuildAndroid=true
143-
144- - name : Collect Android artifacts
145- shell : bash
146- run : |
147- mkdir -p "$OUTPUT_DIR/android"
148- find . -type f \( -name "*-Signed.apk" -o -name "*.aab" \) -exec cp {} "$OUTPUT_DIR/android/" \;
149- echo "Android artifacts collected:"
150- ls -la "$OUTPUT_DIR/android"
151-
152- - name : Upload Android artifacts
153- uses : actions/upload-artifact@v4
154- with :
155- name : android-builds
156- path : ${{ env.OUTPUT_DIR }}/android/*
157- retention-days : 5
158-
159- package_release :
160- name : Linux builds, package and release
161- needs : [build-win, build-mac, build-android]
162- runs-on : ubuntu-latest
163- steps :
164- - name : Checkout code
165- uses : actions/checkout@v4
166- with :
167- fetch-depth : 0
168- ref : ' ${{ github.ref }}'
169-
170- - name : Set environment
171- shell : bash
172- run : |
173- echo "VERSION=$(echo ${{ github.ref_name }} | cut -c 2-)" >> $GITHUB_ENV
174- echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV
175-
176- - name : Create directories
177- shell : bash
178- run : |
179- mkdir -p "$OUTPUT_DIR"
180- mkdir -p "$PUBLISH_DIR"
181-
182- - name : Install utilities
183- # zip for packaging windows builds
184- # nsis for windows installer
185- run : sudo apt-get update && sudo apt-get install zip nsis
186-
187- - name : Setup .NET
188- uses : actions/setup-dotnet@v4
189- with :
190- dotnet-version : ' 6.0.x'
191-
192- - name : Publish Linux RIDs
151+ - name : Publish Linux/Android RIDs
193152 shell : bash
194153 run : ./ci/publish_all_host.sh
195154
196155 - name : Download Windows build artifact
197- uses : actions/download-artifact@v4
156+ uses : actions/download-artifact@v8
198157 with :
199158 name : win-builds
200159 path : ${{ env.PUBLISH_DIR }}
201160
202161 - name : Download macOS build artifact
203- uses : actions/download-artifact@v4
162+ uses : actions/download-artifact@v8
204163 with :
205164 name : mac-builds
206165 path : ${{ env.PUBLISH_DIR }}
207166
208- - name : Download Android build artifact
209- uses : actions/download-artifact@v4
210- with :
211- name : android-builds
212- path : ${{ env.OUTPUT_DIR }}/android
213-
214167 - name : Extract build archives
215168 run : |
216169 cd "$PUBLISH_DIR"
@@ -234,9 +187,10 @@ jobs:
234187 run : ${{ github.workspace }}/ci/create_appimage.sh
235188
236189 - name : Generate Release
237- uses : softprops/action-gh-release@v2
238- with :
239- draft : true
240- files : |
190+ env :
191+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
192+ run : |
193+ gh release create ${{ github.ref_name }} \
194+ --title "${{ github.ref_name }}" \
195+ --draft \
241196 ${{ env.OUTPUT_DIR }}/*
242- ${{ env.OUTPUT_DIR }}/android/*
0 commit comments