From 18ec1f4ef1e9b9ac872b9a03c8c4cc429873c37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Conrad=20H=C3=BCbler?= Date: Fri, 27 Dec 2024 16:24:41 +0100 Subject: [PATCH] timestamp 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 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c183c52..c70faf2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,9 @@ jobs: git submodule update --init --recursive ls -la + - name: Set Timestamp + run: echo "BUILD_TIMESTAMP=$(date +%Y%m%d_%H%M%S)" >> $GITHUB_ENV + - name: Build noarch working-directory: /home/mersdk/harbour-tidalplayer env: @@ -35,27 +38,23 @@ jobs: pwd mb2 -t SailfishOS-4.6.0.13-aarch64 build - - name: Rename RPM to noarch with timestamp run: | cd /home/mersdk/harbour-tidalplayer/RPMS/ - TIMESTAMP=$(date +%Y%m%d_%H%M%S) - mv harbour-tidalplayer-*-1.aarch64.rpm "harbour-tidalplayer-master-${TIMESTAMP}-1.noarch.rpm" + mv harbour-tidalplayer-*-1.aarch64.rpm "harbour-tidalplayer-master-${{ env.BUILD_TIMESTAMP }}-1.noarch.rpm" ls -la - name: Install curl run: | sudo zypper --non-interactive install curl - - name: Upload to Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | cd /home/mersdk/harbour-tidalplayer/RPMS/ - TIMESTAMP=$(date +%Y%m%d_%H%M%S) curl -X POST \ -H "Authorization: token $GITHUB_TOKEN" \ -H "Content-Type: application/x-rpm" \ - --data-binary @"harbour-tidalplayer-master-${TIMESTAMP}-1.noarch.rpm" \ - "https://uploads.github.com/repos/conradhuebler/harbour-tidalplayer/releases/148043359/assets?name=harbour-tidalplayer-master-${TIMESTAMP}-1.noarch.rpm" + --data-binary @"harbour-tidalplayer-master-${{ env.BUILD_TIMESTAMP }}-1.noarch.rpm" \ + "https://uploads.github.com/repos/conradhuebler/harbour-tidalplayer/releases/148043359/assets?name=harbour-tidalplayer-master-${{ env.BUILD_TIMESTAMP }}-1.noarch.rpm"