From 39594ee2522b6c214a687c432d77e2f1b74853f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Conrad=20H=C3=BCbler?= Date: Thu, 26 Dec 2024 23:38:53 +0100 Subject: [PATCH] change workflow ..change workflow .... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Conrad Hübler --- .github/workflows/main.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e1e077b..71d8700 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,15 +10,19 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 # Explizit Ubuntu 22.04 verwenden container: image: coderus/sailfishos-platform-sdk:4.4.0.58 options: --privileged steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v3 # Zurück zu v3, da es stabiler mit Containern arbeitet + with: + fetch-depth: 0 - name: Prepare build environment + shell: bash run: | mkdir -p ~/rpmbuild/SOURCES mkdir -p ~/rpmbuild/SPECS @@ -26,28 +30,28 @@ jobs: cp rpm/harbour-tidalplayer.yaml ~/rpmbuild/SPECS/ - name: Create source tarball + shell: bash run: | VERSION=$(grep "Version:" rpm/harbour-tidalplayer.yaml | cut -d':' -f2 | tr -d ' ') tar --transform "s,^,harbour-tidalplayer-$VERSION/," -czf ~/rpmbuild/SOURCES/harbour-tidalplayer-$VERSION.tar.gz * - name: Build RPM package + shell: bash run: | cd ~/rpmbuild/SPECS mb2 -t SailfishOS-4.4.0.58 -s harbour-tidalplayer.spec build - name: Upload RPM artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v3 # Verwende v3 für bessere Container-Kompatibilität with: name: harbour-tidalplayer-rpm path: ~/rpmbuild/RPMS/**/*.rpm if-no-files-found: error - # Optional: Release erstellen wenn getaggt - name: Create Release if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v1 with: - files: | - ~/rpmbuild/RPMS/**/*.rpm + files: ~/rpmbuild/RPMS/**/*.rpm env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}