X Tutup
Skip to content

feat: Update

feat: Update #47

name: Release (release → PyPI)

Check failure on line 1 in .github/workflows/release-to-pypi.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release-to-pypi.yml

Invalid workflow file

(Line: 55, Col: 9): 'uses' is already defined, (Line: 56, Col: 9): 'with' is already defined
on:
push:
branches:
- release
permissions:
contents: write
id-token: write
pull-requests: write
jobs:
release:
runs-on: ubuntu-latest
environment:
name: pypi-universalpython
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine python-semantic-release
pip install -r utils/requirements.txt
- name: Create stable release
id: release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
semantic-release version --commit --tag --push
- name: Build package
run: bash utils/build_package.sh
# - name: Publish to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/
# packages-dir: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/nc release → main
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
base: main
head: release
title: "chore: merge release changes back into main"
body: |
This PR was created automatically after publishing a new PyPI release.
It keeps `main` in sync with version and changelog updates.
X Tutup