Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
frozenIceage authored Jul 19, 2024
1 parent eda10fc commit 19a9291
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 }}"

0 comments on commit 19a9291

Please sign in to comment.