@@ -2,14 +2,20 @@ name: .NET Build + Test + Publish
22
33on :
44 push :
5- branches : [main]
5+ branches : [main, appimage ]
66 pull_request :
77 branches : [main]
88
99jobs :
10- build :
10+ build-windows :
1111 runs-on : windows-2022
1212
13+ permissions :
14+ contents : write
15+
16+ outputs :
17+ version-number : ${{ steps.version.outputs.number}}
18+
1319 steps :
1420 - uses : actions/checkout@v4
1521 - uses : dsaltares/fetch-gh-release-asset@master
3945 - name : Publish Windows 32bit
4046 if : ${{ github.event_name != 'pull_request' }}
4147 run : dotnet publish --os win --arch x86 -f net9.0 -c Release --self-contained false MSURandomizer/MSURandomizer.csproj
42- - name : Publish Linux 64bit
43- if : ${{ github.event_name != 'pull_request' }}
44- run : dotnet publish --os linux --arch x64 -f net9.0 -c Release --self-contained false MSURandomizer/MSURandomizer.csproj
4548 - name : Publish Windows 64bit
4649 if : ${{ github.event_name != 'pull_request' }}
4750 run : dotnet publish -f net9.0
@@ -62,14 +65,78 @@ jobs:
6265 working-directory : setup
6366 run : " ./CopyNugetPackages.ps1"
6467 shell : pwsh
65- - name : Building the Linux 64bit package
66- if : ${{ github.event_name != 'pull_request' }}
67- working-directory : setup
68- run : " ./LinuxBuildZipper.ps1"
69- shell : pwsh
7068 - name : Upload artifact
7169 uses : actions/upload-artifact@v4
7270 if : ${{ github.event_name != 'pull_request' }}
7371 with :
7472 path : " setup/Output/*"
75- name : MSURandomizer_${{ steps.version.outputs.number }}
73+ name : MSURandomizerWindows
74+
75+ build-linux :
76+ runs-on : ubuntu-22.04
77+
78+ needs : [build-windows]
79+
80+ permissions :
81+ contents : write
82+
83+ steps :
84+ - uses : actions/checkout@v4
85+ - uses : dsaltares/fetch-gh-release-asset@master
86+ with :
87+ repo : " MattEqualsCoder/ALttPMSUShuffler"
88+ file : " msu_types.json"
89+ target : " MSURandomizerLibrary/msu_types.json"
90+ token : ${{ secrets.GITHUB_TOKEN }}
91+ - name : Setup .NET
92+ uses : actions/setup-dotnet@v4
93+ with :
94+ dotnet-version : 9.0.x
95+ - name : Install PupNet
96+ run : dotnet tool install -g KuiperZone.PupNet
97+ - name : Download AppImageTool
98+ run : |
99+ wget -P "$HOME/.local/bin" "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
100+ chmod +x "$HOME/.local/bin/appimagetool-x86_64.AppImage"
101+ appimagetool-x86_64.AppImage --version
102+ - name : Run PupNet
103+ run : pupnet Setup/AppImage.pupnet.conf --kind appimage -y
104+ - name : Upload artifact
105+ uses : actions/upload-artifact@v4
106+ if : ${{ github.event_name != 'pull_request' }}
107+ with :
108+ path : " Setup/Output/MSURandomizer*.AppImage"
109+ name : MSURandomizerLinux
110+
111+ package :
112+ runs-on : ubuntu-22.04
113+
114+ needs : [build-windows, build-linux]
115+
116+ permissions :
117+ contents : write
118+
119+ steps :
120+ - uses : actions/download-artifact@v5
121+ with :
122+ name : MSURandomizerWindows
123+ path : out
124+ - uses : actions/download-artifact@v5
125+ with :
126+ name : MSURandomizerLinux
127+ path : out
128+ - name : Extract some files
129+ run : |
130+ ls -alR
131+ - name : Upload artifact
132+ uses : actions/upload-artifact@v4
133+ if : ${{ github.event_name != 'pull_request' }}
134+ with :
135+ path : " out/*"
136+ name : MSURandomizer_${{ needs.build-windows.outputs.version-number }}
137+ - name : Delete old artifacts
138+ uses : geekyeggo/delete-artifact@v5
139+ with :
140+ name : |
141+ MSURandomizerWindows
142+ MSURandomizerLinux
0 commit comments