All checks were successful
MusicPlayer Fedora Build / fedora-compilation (push) Successful in 5m12s
46 lines
2.0 KiB
YAML
46 lines
2.0 KiB
YAML
name: MusicPlayer Fedora Build
|
||
on: [push]
|
||
|
||
jobs:
|
||
fedora-compilation:
|
||
runs-on: fedora-latest
|
||
steps:
|
||
- name: Gerekli Araçları Kur
|
||
run: |
|
||
dnf install -y git gcc gcc-c++ make cmake pkgconfig curl
|
||
|
||
- name: Kodları Manuel Çek
|
||
run: |
|
||
git clone https://git.y1lm0z.me/y1lm0z/cmus.git .
|
||
|
||
- name: Bağımlılıkları Kur
|
||
run: |
|
||
dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm || true
|
||
dnf install -y \
|
||
'pkgconfig(ncursesw)' 'pkgconfig(alsa)' 'pkgconfig(ao)' \
|
||
'pkgconfig(libcddb)' 'pkgconfig(libcdio_cdda)' 'pkgconfig(libdiscid)' \
|
||
'pkgconfig(libavformat)' 'pkgconfig(libavcodec)' 'pkgconfig(libswresample)' \
|
||
'pkgconfig(flac)' 'pkgconfig(jack)' 'pkgconfig(mad)' \
|
||
'pkgconfig(libmodplug)' libmpcdec-devel 'pkgconfig(libsystemd)' \
|
||
'pkgconfig(opusfile)' 'pkgconfig(libpulse)' 'pkgconfig(samplerate)' \
|
||
'pkgconfig(vorbisfile)' 'pkgconfig(wavpack)' \
|
||
faad2-devel libmp4v2-devel
|
||
|
||
- name: Derle
|
||
run: |
|
||
if [ -f ./configure ]; then ./configure prefix=/usr && make -j$(nproc);
|
||
elif [ -f CMakeLists.txt ]; then mkdir -p build && cd build && cmake .. && make -j$(nproc);
|
||
else make -j$(nproc); fi
|
||
|
||
- name: Manuel Release Yükle (API ile)
|
||
run: |
|
||
# Derlenen dosyayı zipleyelim
|
||
tar -czvf cmus-fedora.tar.gz cmus cmus-remote
|
||
|
||
# Gitea API kullanarak dosyayı "Attachment" olarak yükle
|
||
# Gitea iç network üzerinden token ile gönderiyoruz
|
||
# Not: 'secrets.RELEASE_TOKEN' kısmını aşağıda açıklayacağım
|
||
curl -H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
|
||
-F "attachment=@cmus-fedora.tar.gz" \
|
||
"https://git.y1lm0z.me/api/v1/repos/${{ gitea.repository }}/releases/latest/assets" || echo "Release bulunamadı, manuel oluşturun."
|