Merge pull request #39 from FixeQyt/patch-5 #123
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Package | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- name: π | Checkout repository | |
uses: actions/checkout@v2 | |
- name: π | Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '8.0.x' | |
- name: ποΈ | Build and publish for macOS (x64) | |
run: | | |
cd SkEditor | |
dotnet restore | |
dotnet publish -c Release -r osx-x64 -p:PublishSingleFile=true --no-self-contained --nologo -v q --property WarningLevel=0 /clp:ErrorsOnly /p:DebugType=None /p:DebugSymbols=false | |
- name: π οΈ | Create .app structure | |
run: | | |
mkdir -p "SkEditor.app/Contents/MacOS" | |
mkdir -p "SkEditor.app/Contents/Resources" | |
cp -r SkEditor/bin/Release/net8.0/osx-x64/publish/* "SkEditor.app/Contents/MacOS/" | |
cp SkEditor/Info.plist "SkEditor.app/Contents/" | |
cp SkEditor/SkEditor.icns "SkEditor.app/Contents/Resources/" | |
- name: π | Set execute permissions | |
run: | | |
find SkEditor.app/Contents/MacOS/ -type f -exec chmod +x {} \; | |
- name: π¦ | Zip .app package | |
run: | | |
zip -r SkEditorMac.zip SkEditor.app | |
- name: π€ | Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: SkEditorMac | |
path: SkEditorMac.zip | |
# now build osx-arm64 | |
- name: ποΈ | Build and publish for macOS (arm64) | |
run: | | |
cd SkEditor | |
dotnet restore | |
dotnet publish -c Release -r osx-arm64 -p:PublishSingleFile=true --no-self-contained --nologo -v q --property WarningLevel=0 /clp:ErrorsOnly /p:DebugType=None /p:DebugSymbols=false | |
- name: π οΈ | Create .app structure (arm64) | |
run: | | |
mkdir -p "SkEditor.app/Contents/MacOS" | |
mkdir -p "SkEditor.app/Contents/Resources" | |
cp -r SkEditor/bin/Release/net8.0/osx-arm64/publish/* "SkEditor.app/Contents/MacOS/" | |
cp SkEditor/Info.plist "SkEditor.app/Contents/" | |
cp SkEditor/SkEditor.icns "SkEditor.app/Contents/Resources/" | |
- name: π | Set execute permissions (arm64) | |
run: | | |
find SkEditor.app/Contents/MacOS/ -type f -exec chmod +x {} \; | |
- name: π¦ | Zip .app package (arm64) | |
run: | | |
zip -r SkEditorMac-arm64.zip SkEditor.app | |
- name: π€ | Upload artifacts (arm64) | |
uses: actions/upload-artifact@v2 | |
with: | |
name: SkEditorMac-arm64 | |
path: SkEditorMac-arm64.zip | |
build-linux-debian-arm64: | |
runs-on: ubuntu-latest | |
steps: | |
- name: π | Checkout repository | |
uses: actions/checkout@v2 | |
- name: π | Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '8.0.x' | |
- name: ποΈ | Build and publish for Debian | |
run: | | |
cd SkEditor | |
dotnet restore | |
dotnet publish -c Release -r linux-arm64 -p:PublishSingleFile=true --no-self-contained --nologo -v q --property WarningLevel=0 /clp:ErrorsOnly /p:DebugType=None /p:DebugSymbols=false | |
- name: π | Install Dependencies | |
run: | | |
sudo apt update | |
sudo apt install wget -y | |
- name: π οΈ | Create .deb structure | |
run: | | |
mkdir -p "SkEditorFiles/opt/SkEditor" | |
cp -r SkEditor/bin/Release/net8.0/linux-arm64/publish/* "SkEditorFiles/opt/SkEditor/" | |
mkdir -p "SkEditorFiles/usr/share/applications" | |
cd SkEditorFiles/usr/share/applications | |
wget -O SkEditor.desktop -r 'https://www.dropbox.com/scl/fi/vy8j6uil0aj1k3mhjbq1n/SkEditor.desktop?rlkey=xhvi3ay35g1afox23pgvu0ht4&dl=1' | |
wget -O /home/runner/work/SkEditor/SkEditor/SkEditorFiles/opt/SkEditor/SkEditor.png https://raw.githubusercontent.com/SkEditorTeam/SkEditor/main/SkEditor.png | |
mkdir -p "/home/runner/work/SkEditor/SkEditor/SkEditorFiles/DEBIAN" | |
cd /home/runner/work/SkEditor/SkEditor/SkEditorFiles/DEBIAN | |
pwd | |
wget -O control -r 'https://www.dropbox.com/scl/fi/tep20aykrghy2aamc1m77/control-arm64?rlkey=bhfztntq2tzzbtiv3xv9oea6j&dl=1' | |
echo "Version: 2.3.0" >> control | |
echo "Maintainer: Notro" >> control | |
wget -O postrm -r 'https://www.dropbox.com/scl/fi/qni5y6fahxrz80ttenct5/postrm?rlkey=zn88axbghrwxokxtx1i5hhbgr&dl=1' | |
echo "ln -s /opt/SkEditor/SkEditor /bin/SkEditor" > postinst | |
- name: π | Fix Permissions | |
run: | | |
cd /home/runner/work/SkEditor/SkEditor/SkEditorFiles/DEBIAN | |
chmod 0755 postrm | |
chmod 0755 control | |
chmod 0755 postinst | |
- name: π¦ | Create .deb package | |
run: | | |
cd /home/runner/work/SkEditor/SkEditor/ | |
pwd | |
dpkg-deb -b SkEditorFiles SkEditor-arm64.deb | |
- name: π€ | Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: SkEditorLinuxDebian (arm64) | |
path: SkEditor-arm64.deb | |
build-linux-debian-x64: | |
runs-on: ubuntu-latest | |
steps: | |
- name: π | Checkout repository | |
uses: actions/checkout@v2 | |
- name: π | Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '8.0.x' | |
- name: ποΈ | Build and publish for Debian | |
run: | | |
cd SkEditor | |
dotnet restore | |
dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true --no-self-contained /p:DebugType=None /p:DebugSymbols=false | |
- name: π | Install Dependencies | |
run: | | |
sudo apt update | |
sudo apt install wget -y | |
- name: π οΈ | Create .deb structure | |
run: | | |
mkdir -p "SkEditorFilesx/opt/SkEditor" | |
cp -r SkEditor/bin/Release/net8.0/linux-x64/publish/* "SkEditorFilesx/opt/SkEditor/" | |
mkdir -p "SkEditorFilesx/usr/share/applications" | |
cd SkEditorFilesx/usr/share/applications | |
wget -O SkEditor.desktop -r 'https://www.dropbox.com/scl/fi/vy8j6uil0aj1k3mhjbq1n/SkEditor.desktop?rlkey=xhvi3ay35g1afox23pgvu0ht4&dl=1' | |
wget -O /home/runner/work/SkEditor/SkEditor/SkEditorFilesx/opt/SkEditor/SkEditor.png https://raw.githubusercontent.com/SkEditorTeam/SkEditor/main/SkEditor.png | |
mkdir -p "/home/runner/work/SkEditor/SkEditor/SkEditorFilesx/DEBIAN" | |
cd /home/runner/work/SkEditor/SkEditor/SkEditorFilesx/DEBIAN | |
pwd | |
wget -O control -r 'https://www.dropbox.com/scl/fi/tep20aykrghy2aamc1m77/control-arm64?rlkey=bhfztntq2tzzbtiv3xv9oea6j&dl=1' | |
echo "Version: 2.3.0" >> control | |
echo "Maintainer: Notro" >> control | |
wget -O postrm -r 'https://www.dropbox.com/scl/fi/qni5y6fahxrz80ttenct5/postrm?rlkey=zn88axbghrwxokxtx1i5hhbgr&dl=1' | |
echo "ln -s /opt/SkEditor/SkEditor /bin/SkEditor" > postinst | |
- name: π | Fix Permissions | |
run: | | |
cd /home/runner/work/SkEditor/SkEditor/SkEditorFilesx/DEBIAN | |
chmod 0755 postrm | |
chmod 0755 control | |
chmod 0755 postinst | |
- name: π¦ | Create .deb package | |
run: | | |
cd /home/runner/work/SkEditor/SkEditor/ | |
pwd | |
dpkg-deb -b SkEditorFilesx SkEditor-x64.deb | |
- name: π€ | Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: SkEditorLinuxDebian (x64) | |
path: SkEditor-x64.deb |