mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-20 01:27:44 +02:00
Merge pull request #1124 from django-helpdesk/fix_release_script
Fix PyPi release script. Support ReadTheDocs automated release.
This commit is contained in:
commit
0d91fcca0b
32
.github/workflows/release_to_pypi.yml
vendored
32
.github/workflows/release_to_pypi.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Publish ${package_name} to PyPI / GitHub
|
name: Publish ${package_name} to PyPI and ReadTheDocs
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -11,7 +11,9 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source
|
- name: Checkout source
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.ref_name }}
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
@ -29,29 +31,3 @@ jobs:
|
|||||||
user: __token__
|
user: __token__
|
||||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
|
||||||
- name: Create GitHub Release
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
|
||||||
with:
|
|
||||||
tag_name: ${{ github.ref }}
|
|
||||||
release_name: ${{ github.ref }}
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
|
|
||||||
- name: Get Asset name
|
|
||||||
run: |
|
|
||||||
export PKG=$(ls dist/ | grep tar)
|
|
||||||
set -- $PKG
|
|
||||||
echo "name=$1" >> $GITHUB_ENV
|
|
||||||
- name: Upload Release Asset (sdist) to GitHub
|
|
||||||
id: upload-release-asset
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: dist/${{ env.name }}
|
|
||||||
asset_name: ${{ env.name }}
|
|
||||||
asset_content_type: application/zip
|
|
||||||
|
32
.readthedocs.yaml
Normal file
32
.readthedocs.yaml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# Read the Docs configuration file for Sphinx projects
|
||||||
|
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||||
|
|
||||||
|
# Required
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
# Set the OS, Python version and other tools you might need
|
||||||
|
build:
|
||||||
|
os: ubuntu-22.04
|
||||||
|
tools:
|
||||||
|
python: "3.11"
|
||||||
|
|
||||||
|
# Build documentation in the "docs/" directory with Sphinx
|
||||||
|
sphinx:
|
||||||
|
configuration: docs/conf.py
|
||||||
|
|
||||||
|
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
|
||||||
|
# builder: "dirhtml"
|
||||||
|
# Fail on all warnings to avoid broken references
|
||||||
|
# fail_on_warning: true
|
||||||
|
|
||||||
|
# Optionally build your docs in additional formats such as PDF and ePub
|
||||||
|
# formats:
|
||||||
|
# - pdf
|
||||||
|
# - epub
|
||||||
|
|
||||||
|
# Optional but recommended, declare the Python requirements required
|
||||||
|
# to build your documentation
|
||||||
|
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
|
||||||
|
# python:
|
||||||
|
# install:
|
||||||
|
# - requirements: docs/requirements.txt
|
10
docs/conf.py
10
docs/conf.py
@ -43,16 +43,16 @@ master_doc = 'index'
|
|||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = u'django-helpdesk'
|
project = u'django-helpdesk'
|
||||||
copyright = u'2011-2019, Ross Poulton + django-helpdesk Contributors'
|
copyright = u'2011-2023, Django-helpdesk Contributors'
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
# |version| and |release|, also used in various other places throughout the
|
# |version| and |release|, also used in various other places throughout the
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '0.3'
|
version = '1.x'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '0.3.0.dev2'
|
release = '1.x'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
@ -181,7 +181,7 @@ htmlhelp_basename = 'django-helpdeskdoc'
|
|||||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
('index', 'django-helpdesk.tex', u'django-helpdesk Documentation',
|
('index', 'django-helpdesk.tex', u'django-helpdesk Documentation',
|
||||||
u'Ross Poulton + django-helpdesk Contributors', 'manual'),
|
u'django-helpdesk Contributors', 'manual'),
|
||||||
]
|
]
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top of
|
# The name of an image file (relative to this directory) to place at the top of
|
||||||
@ -214,5 +214,5 @@ latex_documents = [
|
|||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = [
|
||||||
('index', 'django-helpdesk', u'django-helpdesk Documentation',
|
('index', 'django-helpdesk', u'django-helpdesk Documentation',
|
||||||
[u'Ross Poulton + django-helpdesk Contributors'], 1)
|
[u'django-helpdesk Contributors'], 1)
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user