fix: hehehe #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Delivery | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
concurrency: release | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
# Build Package | |
- name: Setup | Checkout Repository at workflow sha | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.sha }} | |
- name: Build Package | |
run: | | |
python -m pip install --upgrade build | |
python -m build | |
- name: Setup | Force correct release branch on workflow sha | |
run: | | |
git checkout -B ${{ github.ref_name }} ${{ github.sha }} | |
- name: Action | Semantic Version Release | |
id: release | |
# Adjust tag with desired version if applicable. | |
uses: python-semantic-release/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
git_committer_name: "github-actions" | |
git_committer_email: "[email protected]" | |
changelog: "false" | |
- name: Publish | Upload package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: steps.release.outputs.released == 'true' | |
with: | |
password: ${{ secrets.PYPI_TOKEN }} | |
- name: Publish | Upload to GitHub Release Assets | |
uses: python-semantic-release/[email protected] | |
if: steps.release.outputs.released == 'true' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ steps.release.outputs.tag }} |