mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Switch the Publish Release workflow to use OpenID Connect (#6012)
This commit is contained in:
parent
c2da29c93e
commit
64c72e79b5
49
.github/workflows/publish_release.yml
vendored
49
.github/workflows/publish_release.yml
vendored
@ -53,28 +53,53 @@ jobs:
|
||||
echo 'Continuing...'
|
||||
fi
|
||||
|
||||
release_to_pypi:
|
||||
needs: release_information
|
||||
environment: Release
|
||||
name: Release to PyPI
|
||||
build:
|
||||
name: Build package
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install build twine
|
||||
- name: Build and publish
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.pypi_token }}
|
||||
run: |
|
||||
python -m build
|
||||
twine upload dist/*
|
||||
python -m pip install --upgrade build twine
|
||||
|
||||
- name: Build
|
||||
run: python -m build
|
||||
- name: Check built distributions
|
||||
run: python -m twine check dist/*
|
||||
|
||||
- name: Upload packaged distributions
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
path: ./dist
|
||||
|
||||
release_to_pypi:
|
||||
needs:
|
||||
- release_information
|
||||
- build
|
||||
environment: Release
|
||||
name: Release to PyPI
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Download packaged distributions
|
||||
uses: actions/download-artifact@v3
|
||||
|
||||
- name: Publish package distributions to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
# This is already checked during the build.
|
||||
verify-metadata: false
|
||||
# Allow security-minded people to verify whether the files on PyPI
|
||||
# were automatically uploaded by a CI script.
|
||||
print-hash: true
|
||||
|
||||
pr_dev_bump:
|
||||
permissions:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user