cd: add other package formats in circle ci build

This commit is contained in:
Kingkor Roy Tirtho 2023-09-14 23:36:14 +06:00
parent ce8f734b58
commit 1d9638a20b
3 changed files with 27 additions and 29 deletions

View File

@ -9,7 +9,7 @@ jobs:
- checkout
- run: |
sudo apt-get update -y &&
sudo apt-get install -y tar clang cmake ninja-build pkg-config libgtk-3-dev make python3-pip python3-setuptools desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse libunwind-dev locate patchelf gir1.2-appindicator3-0.1 libappindicator3-1 libappindicator3-dev libsecret-1-0 libjsoncpp25 libsecret-1-dev libjsoncpp-dev libnotify-bin libnotify-dev mpv libmpv-dev
sudo apt-get install -y tar clang cmake ninja-build pkg-config libgtk-3-dev make python3-pip python3-setuptools desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace fuse libunwind-dev locate patchelf gir1.2-appindicator3-0.1 libappindicator3-1 libappindicator3-dev libsecret-1-0 libjsoncpp25 libsecret-1-dev libjsoncpp-dev libnotify-bin libnotify-dev mpv libmpv-dev zip
- run: |
git clone https://github.com/flutter/flutter.git
@ -18,10 +18,15 @@ jobs:
flutter precache
flutter doctor -v
- persist_to_workspace:
root: flutter
paths:
- .
- run: |
echo "SPOTIFY_SECRETS=${SPOTIFY_SECRETS}" >> .env
echo "SUPABASE_URL=" >> .env
echo "SUPABASE_API_KEY=" >> .env
echo "SUPABASE_URL=${SUPABASE_URL}" >> .env
echo "SUPABASE_API_KEY=${SUPABASE_API_KEY}" >> .env
- run: |
export PATH="$PATH:`pwd`/flutter/bin"
@ -31,17 +36,23 @@ jobs:
- run: |
export PATH="$PATH:`pwd`/flutter/bin"
flutter build linux --target-platform=linux-arm64
mkdir -p /tmp/spotube-tar
cp -r build/linux/arm64/release/bundle/* /tmp/spotube-tar
cp linux/spotube.desktop /tmp/spotube-tar
cp assets/spotube-logo.png /tmp/spotube-tar
cp linux/com.github.KRTirtho.Spotube.appdata.xml /tmp/spotube-tar
tar -cJf build/spotube-linux-3.1.1-aarch64.tar.xz -C /tmp/spotube-tar .
rm -rf /tmp/spotube-tar
dart pub global activate flutter_distributor
alias dpkg-deb="dpkg-deb --Zxz"
dart run flutter_distributor package --platform=linux --targets=deb
dart run flutter_distributor package --platform=linux --targets=appimage
dart run flutter_distributor package --platform=linux --targets=rpm
make tar VERSION=nightly ARCH=arm64 PKG_ARCH=aaarch64
- run: |
mkdir bundle
mv build/spotube-linux-*-aarch64.tar.xz bundle/
mv dist/**/spotube-*-linux.deb bundle/Spotube-linux-aarch64.deb
mv dist/**/spotube-*-linux.rpm bundle/Spotube-linux-aarch64.rpm
mv dist/**/spotube-*-linux.AppImage bundle/Spotube-linux-aarch64.AppImage
zip -r Spotube-linux-aarch64.zip bundle
- store_artifacts:
path: build/spotube-linux-3.1.1-aarch64.tar.xz
path: Spotube-linux-aarch64.zip
workflows:
build_flutter_for_arm_workflow:

View File

@ -164,11 +164,11 @@ jobs:
- name: Create tar.xz (stable)
if: ${{ inputs.channel == 'stable' }}
run: make tar VERSION=${{ env.BUILD_VERSION }}
run: make tar VERSION=${{ env.BUILD_VERSION }} ARCH=x64 PKG_ARCH=x86_64
- name: Create tar.xz (nightly)
if: ${{ inputs.channel == 'nightly' }}
run: make tar VERSION=nightly
run: make tar VERSION=nightly ARCH=x64 PKG_ARCH=x86_64
- name: Move Files to dist
run: |

View File

@ -1,17 +1,8 @@
INNO_VERSION=6.2.0
TEMP_DIR=/tmp/spotube-tar
USR_SHARE=deb-struct/usr/share
BUNDLE_DIR=build/linux/x64/release/bundle
BUNDLE_DIR=build/linux/${ARCH}/release/bundle
MIRRORLIST=${PWD}/build/mirrorlist
deb:
mkdir -p ${USR_SHARE}/spotube\
&& mkdir -p $(USR_SHARE)/applications $(USR_SHARE)/icons/spotube $(USR_SHARE)/spotube $(USR_SHARE)/appdata\
&& cp -r $(BUNDLE_DIR)/* $(USR_SHARE)/spotube\
&& cp linux/spotube.desktop $(USR_SHARE)/applications/\
&& cp linux/com.github.KRTirtho.Spotube.appdata.xml $(USR_SHARE)/appdata/spotube.appdata.xml\
&& cp assets/spotube-logo.png $(USR_SHARE)/icons/spotube\
&& sed -i 's|com.github.KRTirtho.Spotube|spotube|' $(USR_SHARE)/appdata/spotube.appdata.xml\
&& dpkg-deb -b deb-struct/ build/Spotube-linux-x86_64.deb
tar:
mkdir -p $(TEMP_DIR)\
@ -19,13 +10,9 @@ tar:
&& cp linux/spotube.desktop $(TEMP_DIR)\
&& cp assets/spotube-logo.png $(TEMP_DIR)\
&& cp linux/com.github.KRTirtho.Spotube.appdata.xml $(TEMP_DIR)\
&& tar -cJf build/spotube-linux-${VERSION}-x86_64.tar.xz -C $(TEMP_DIR) .\
&& tar -cJf build/spotube-linux-${VERSION}-${PKG_ARCH}.tar.xz -C $(TEMP_DIR) .\
&& rm -rf $(TEMP_DIR)
appimage:
appimage-builder --recipe AppImageBuilder.yml\
&& mv Spotube-*-x86_64.AppImage build
aursrcinfo:
docker run -e EXPORT_SRC=1 -v ${PWD}/aur-struct:/pkg -v ${MIRRORLIST}:/etc/pacman.d/mirrorlist:ro whynothugo/makepkg