WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

v7.0.5

v7.0.5 #28

Workflow file for this run

on:
release:
types:
- published
name: release
jobs:
package:
name: Package release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- run: |
pip3 install --upgrade build
python -m build
- uses: actions/upload-artifact@v4
with:
path: ./dist
pypi-publish:
needs: ['package']
name: Upload release to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: artifact/
readme-changelog:
name: Publish changelog to Readme
needs: ['pypi-publish']
runs-on: ubuntu-latest
steps:
- name: Extract release data
id: release
run: |
echo "title=$(echo "${{ github.event.release.name }}" | sed 's/"/\\"/g')" >> $GITHUB_OUTPUT
echo "body=$(echo "${{ github.event.release.body }}" | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/"/\\"/g')" >> $GITHUB_OUTPUT
- name: Publish changelog to Readme
env:
README_API_KEY: ${{ secrets.README_API_KEY }}
run: |
curl --location 'https://api.readme.com/v2/changelogs' \
--header "Authorization: Bearer $README_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"body": "${{ steps.release.outputs.body }}",
"title": "Python Unified SDK ${{ steps.release.outputs.title }}",
"privacy": {
"view": "public"
}
}'