Bumps the github-actions group with 1 update: [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish). Updates `pypa/gh-action-pypi-publish` from 1.10.2 to 1.10.3 - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.10.2...v1.10.3) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
name: deploy
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Release version'
|
|
required: true
|
|
default: '1.2.3'
|
|
|
|
jobs:
|
|
|
|
package:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.version }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build and Check Package
|
|
uses: hynek/build-and-inspect-python-package@v2.9
|
|
|
|
deploy:
|
|
needs: package
|
|
runs-on: ubuntu-latest
|
|
environment: deploy
|
|
permissions:
|
|
id-token: write # For PyPI trusted publishers.
|
|
contents: write # For tag.
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Download Package
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: Packages
|
|
path: dist
|
|
|
|
- name: Publish package to PyPI
|
|
uses: pypa/gh-action-pypi-publish@v1.10.3
|
|
with:
|
|
attestations: true
|
|
|
|
- name: Push tag
|
|
run: |
|
|
git config user.name "pytest bot"
|
|
git config user.email "pytestbot@gmail.com"
|
|
git tag --annotate --message=v${{ github.event.inputs.version }} v${{ github.event.inputs.version }} ${{ github.sha }}
|
|
git push origin v${{ github.event.inputs.version }}
|
|
|
|
- name: GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: dist/*
|
|
tag_name: v${{ github.event.inputs.version }}
|