Skip to content

Merge pull request #82 from FixeQyt/patch-12 #163

Merge pull request #82 from FixeQyt/patch-12

Merge pull request #82 from FixeQyt/patch-12 #163

Workflow file for this run

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 -p:PublishReadyToRun=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 -p:PublishReadyToRun=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 -p:PublishReadyToRun=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 curl -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/v178sdzprbasul0xatg1y/SkEditor.desktop?rlkey=fq2nsuf9dyvlm7jhg9e5jugqu&st=6vlpjwjg&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 mime/packages
cd mime/packages
wget -O skript.xml -r 'https://www.dropbox.com/scl/fi/5fh65lwl5n352tik2hl5p/skript.xml?rlkey=kikicagf306vd1b2lcaenyjyu&st=i6abr09z&dl=1'
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 "exported_ver=\$(curl -s \"https://camo.githubusercontent.com/024e74589d307c8cbe664b87c58cf65e2b62587aec02459d998719874ea7b5eb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f536b456469746f725465616d2f536b456469746f723f636f6c6f723d253233376133346562266c6162656c3d76657273696f6e267374796c653d666c61742d737175617265\" | grep -oP '(?<=<title>).*?(?=</title>)' | sed 's/v\([0-9]\)/\1/') && exported_ver=\"\${exported_ver^}\"" >> getver
echo "echo \"\$exported_ver-gh-b${GITHUB_RUN_ID}\" >> control" >> getver
bash getver
rm -f getver
echo "Maintainer: Notro" >> control
wget -O postrm -r 'https://www.dropbox.com/scl/fi/qni5y6fahxrz80ttenct5/postrm?rlkey=zn88axbghrwxokxtx1i5hhbgr&dl=1'
wget -O preinst -r 'https://www.dropbox.com/scl/fi/d3v6523n16ndetbg7x5yh/preinst?rlkey=xfrk7go1gxl8zhwt0cswrihjo&st=rwyq4bpo&dl=1'
wget -O postinst -r 'https://www.dropbox.com/scl/fi/2l1dx0vx3yelfllw7wclk/postinst?rlkey=wx815p6ribc06752t3k6m73qr&st=yvsopgtj&dl=1'
- name: πŸ”‘ | Fix Permissions
run: |
cd /home/runner/work/SkEditor/SkEditor/SkEditorFiles/DEBIAN
chmod 0755 *
- 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: Debian-based operating systems (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 -p:PublishReadyToRun=true --no-self-contained /p:DebugType=None /p:DebugSymbols=false
- name: πŸ“Œ | Install Dependencies
run: |
sudo apt update
sudo apt install wget curl -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/v178sdzprbasul0xatg1y/SkEditor.desktop?rlkey=fq2nsuf9dyvlm7jhg9e5jugqu&st=6vlpjwjg&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 mime/packages
cd mime/packages
wget -O skript.xml -r 'https://www.dropbox.com/scl/fi/5fh65lwl5n352tik2hl5p/skript.xml?rlkey=kikicagf306vd1b2lcaenyjyu&st=i6abr09z&dl=1'
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/1m8evp1rh56zon4s4fwsk/control-x64?rlkey=a8dyx3bpss9bxpjgpwi4wrasp&st=5uyxnsj9&dl=1'
echo "exported_ver=\$(curl -s \"https://camo.githubusercontent.com/024e74589d307c8cbe664b87c58cf65e2b62587aec02459d998719874ea7b5eb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f536b456469746f725465616d2f536b456469746f723f636f6c6f723d253233376133346562266c6162656c3d76657273696f6e267374796c653d666c61742d737175617265\" | grep -oP '(?<=<title>).*?(?=</title>)' | sed 's/v\([0-9]\)/\1/') && exported_ver=\"\${exported_ver^}\"" >> getver
echo "echo \"\$exported_ver-gh-b${GITHUB_RUN_ID}\" >> control" >> getver
bash getver
rm -f getver
echo "Maintainer: Notro" >> control
wget -O postrm -r 'https://www.dropbox.com/scl/fi/qni5y6fahxrz80ttenct5/postrm?rlkey=zn88axbghrwxokxtx1i5hhbgr&dl=1'
wget -O preinst -r 'https://www.dropbox.com/scl/fi/d3v6523n16ndetbg7x5yh/preinst?rlkey=xfrk7go1gxl8zhwt0cswrihjo&st=rwyq4bpo&dl=1'
wget -O postinst -r 'https://www.dropbox.com/scl/fi/2l1dx0vx3yelfllw7wclk/postinst?rlkey=wx815p6ribc06752t3k6m73qr&st=yvsopgtj&dl=1'
- name: πŸ”‘ | Fix Permissions
run: |
cd /home/runner/work/SkEditor/SkEditor/SkEditorFilesx/DEBIAN
chmod 0755 *
- 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: Debian-based operating systems (x64)
path: SkEditor-x64.deb
build-linux:
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 -p:PublishReadyToRun=true --no-self-contained /p:DebugType=None /p:DebugSymbols=false
dotnet publish -c Release -r linux-arm64 -p:PublishSingleFile=true -p:PublishReadyToRun=true --no-self-contained /p:DebugType=None /p:DebugSymbols=false
- name: πŸ› οΈ | Create archive structure
run: |
cd /home/runner/work/SkEditor/SkEditor/
mkdir -p "SkEditorFilesL/x64"
mkdir -p "SkEditorFilesL/arm64"
cp -r SkEditor/bin/Release/net8.0/linux-x64/publish/* "SkEditorFilesL/x64/"
cp -r SkEditor/bin/Release/net8.0/linux-arm64/publish/* "SkEditorFilesL/arm64/"
- name: πŸ“¦ | Pack SkEditor files
run: |
cd /home/runner/work/SkEditor/SkEditor/
tar -czf SkEditor.tar.gz SkEditorFilesL/
- name: πŸ“€ | Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Linux (multiarch)
path: SkEditor.tar.gz