From 19a92918794f31c27e5bd6689cd6571ef3b1d16a Mon Sep 17 00:00:00 2001 From: frozenIceage Date: Fri, 19 Jul 2024 16:25:57 +0200 Subject: [PATCH] Update publish.yml --- .github/workflows/publish.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 763c919..3027ab9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -31,18 +31,13 @@ jobs: pass = ${{ secrets.OSC_PASS }} EOF - name: checkout package - run: | - osc branchco $PROJECT python-$PACKAGE - cd $PROJECT:branches:$PROJECT/python-$PACKAGE - rm *.tar.gz - + run: osc branchco $PROJECT python-$PACKAGE - name: Fetch tarball from PyPI - id: fetch-tarball run: | cd $PROJECT:branches:$PROJECT/python-$PACKAGE + osc rm *.tar.gz FILE_NAME=osc_tiny-${{ env.LATEST_TAG }}.tar.gz FILE_URL=https://files.pythonhosted.org/packages/source/o/osc-tiny/$FILE_NAME - while [ ! -f "$FILE_NAME" ]; do echo "File not found. Downloading..." wget "$FILE_URL" -O "$FILE_NAME" @@ -51,13 +46,18 @@ jobs: sleep 2 fi done - echo "File downloaded successfully!" - - - name: Update and submit package + osc add $FILE_NAME + - name: Update spec and changes files run: | cd $PROJECT:branches:$PROJECT/python-$PACKAGE sed -i "s/^Version:.*/Version: ${{ env.LATEST_TAG }}/" *.spec - sed -i "s/%setup -q -n osc-tiny-%{version}/%setup -q -n osc_tiny-%{version}/" *.spec + sed -i "s/%setup -q -n osc-tiny-%{version}/%setup -q -n osc_tiny-%{version}/" *.spec osc vc -m 'Update to version ${{ env.LATEST_TAG }}' + - name: Commit changes + run: | + cd $PROJECT:branches:$PROJECT/python-$PACKAGE osc commit -m "Update to version ${{ env.LATEST_TAG }}" + - name: Submit a request + run: | + cd $PROJECT:branches:$PROJECT/python-$PACKAGE osc submitrequest -m "Update package to version ${{ env.LATEST_TAG }}"