Skip to content

Commit

Permalink
Merge pull request #119 from FixeQyt/patch-1
Browse files Browse the repository at this point in the history
Removing the build to the Debian distribution FOR NOW because it throws an error during build in github actions.
  • Loading branch information
NotroDev authored Aug 20, 2024
2 parents abcc8d1 + 7251c14 commit b63064e
Showing 1 changed file with 0 additions and 95 deletions.
95 changes: 0 additions & 95 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,101 +45,6 @@ jobs:
name: SkEditorMac
path: "*.zip"

build-linux-debian:
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
for arch in linux-x64 linux-arm64; do
dotnet restore
dotnet publish -c Release -r $arch -p:PublishSingleFile=true -p:PublishReadyToRun=true --no-self-contained /p:DebugType=None /p:DebugSymbols=false
done
- name: πŸ“Œ | Install Dependencies
run: |
sudo apt update
sudo apt install wget curl imagemagick -y
- name: πŸ› οΈ | Create .deb structure
run: |
for arch in x64 arm64; do
mkdir -p "SkEditorFiles-$arch/opt/SkEditor"
cp -r SkEditor/bin/Release/net8.0/linux-$arch/publish/* "SkEditorFiles-$arch/opt/SkEditor/"
mkdir -p "SkEditorFiles-$arch/usr/share/applications"
wget -O SkEditorFiles-$arch/usr/share/applications/SkEditor.desktop 'https://gist.github.com/FixeQyt/8eb19f6f236c504ea86d873bd172113c/raw/ce4a0b2a782e73500aafde3ee24eb8ebf1194f98/SkEditor.desktop'
wget -O SkEditorFiles-$arch/opt/SkEditor/SkEditor.png 'https://raw.githubusercontent.com/SkEditorTeam/SkEditor/main/SkEditor.png'
mkdir -p SkEditorFiles-$arch/usr/share/mime/application
wget -O SkEditorFiles-$arch/usr/share/mime/application/skript.xml 'https://gist.github.com/FixeQyt/8eb19f6f236c504ea86d873bd172113c/raw/6d9cd730ecc86d8113b70b579627b11ff731ad6b/skript.xml'
mkdir -p "SkEditorFiles-$arch/DEBIAN"
wget -O SkEditorFiles-$arch/DEBIAN/control 'https://gist.github.com/FixeQyt/8eb19f6f236c504ea86d873bd172113c/raw/fb98edb82e7df9c973ed80545fb2758caed65692/control'
done
- name: πŸ” | Extract version, measure size, and update control file
run: |
version=$(grep -oP '(?<=<InformationalVersion>).*?(?=</InformationalVersion>)' SkEditor/SkEditor.csproj)
for arch in x64 arm64; do
size=$(du -s --block-size=K SkEditorFiles-$arch/opt/SkEditor | cut -f1 | tr -d 'K')
echo "Version: $version-b${{ github.run_number }}" >> SkEditorFiles-$arch/DEBIAN/control
echo -e "\nVersion=$version" >> SkEditorFiles-$arch/usr/share/applications/SkEditor.desktop
if [ "$arch" = "x64" ]; then
architecture="amd64"
else
architecture="$arch"
fi
echo "Architecture: $architecture" >> SkEditorFiles-$arch/DEBIAN/control
done
- name: πŸ” | Calculate MD5 and SHA256 checksums
run: |
for arch in x64 arm64; do
cd SkEditorFiles-$arch/
find . -type f -not -path './DEBIAN/*' -exec md5sum {} + | sed 's| \./| |' > DEBIAN/md5sums
find . -type f -not -path './DEBIAN/*' -exec sha256sum {} + | sed 's| \./| |' > DEBIAN/sha256sums
cd -
done
- name: 🎨 | Resize icon and create icon directories
run: |
for arch in x64 arm64; do
sizes=(16 24 32 48 64 128 256)
for size in "${sizes[@]}"; do
mkdir -p "SkEditorFiles-$arch/usr/share/icons/hicolor/${size}x${size}/apps"
convert SkEditorFiles-$arch/opt/SkEditor/SkEditor.png -resize ${size}x${size} "SkEditorFiles-$arch/usr/share/icons/hicolor/${size}x${size}/apps/SkEditor.png"
done
done
- name: πŸ“¦ | Download control scripts
run: |
for arch in x64 arm64; do
wget -O SkEditorFiles-$arch/DEBIAN/postrm 'https://gist.github.com/FixeQyt/8eb19f6f236c504ea86d873bd172113c/raw/1eaea30df407c0e8f4b507dd4a0653dd20adc7eb/postrm'
wget -O SkEditorFiles-$arch/DEBIAN/preinst 'https://gist.github.com/FixeQyt/8eb19f6f236c504ea86d873bd172113c/raw/1eaea30df407c0e8f4b507dd4a0653dd20adc7eb/preinst'
wget -O SkEditorFiles-$arch/DEBIAN/postinst 'https://gist.github.com/FixeQyt/8eb19f6f236c504ea86d873bd172113c/raw/23e2c4503059777a10c78f54cbe87fa676bb94d2/postinst'
done
- name: πŸ”‘ | Fix Permissions
run: |
for arch in x64 arm64; do
chmod 0755 SkEditorFiles-$arch/DEBIAN/*
done
- name: πŸ“¦ | Create .deb package
run: |
cd /home/runner/work/SkEditor/SkEditor/
for arch in x64 arm64; do
dpkg-deb -Zgzip -b SkEditorFiles-$arch SkEditor-b${{ github.run_number }}-$arch.deb
done
- name: πŸ“€ | Upload artifacts
env:
TOKEN: ${{ secrets.APT_REPO_TOKEN }}
run: |
for arch in x64 arm64; do
curl --header "Authorization: Bearer ${TOKEN}" --form "package=@SkEditor-b${{ github.run_number }}-$arch.deb" --form "distribution=all" https://fixeq.baltorepo.com/skeditor/app/upload/
done
build-linux:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit b63064e

Please sign in to comment.