-
Notifications
You must be signed in to change notification settings - Fork 2
92 lines (81 loc) · 2.33 KB
/
cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: CD Workflow
on:
push:
tags:
- 'release/v*.*.*'
jobs:
# build:
# name: Build package
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: "3.x"
# - name: Install dependencies
# run: python3 -m pip install build --user
# - name: Build package
# run: python3 -m build
# github-release:
# name: Publish GitHub release
# runs-on: ubuntu-latest
# needs:
# - build
# permissions:
# contents: write
# id-token: write
# steps:
# - name: Download dists
# uses: actions/download-artifact@v3
# with:
# name: python-package-distributions
# path: dist/
# - name: Create GitHub release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# tag_name: ${{ github.ref }}
# release_name: ${{ github.ref }}
# body: |
# See [changelog](https://retryhttp.readthedocs.io/changelog).
# draft: false
# prerelease: false
# - name: Upload release assets
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./dist
# asset_name: retryhttp_${{ github.ref }}.zip
# asset_content_type: application/zip
# publish-to-pypi:
# name: Publish to PyPI
# runs-on: ubuntu-latest
# needs:
# - build
# environment:
# name: pypi
# url: https://pypi.org/p/retryhttp
# permissions:
# id-token: write
# steps:
# - name: Download dists
# uses: actions/download-artifact@v3
# with:
# name: python-package-distributions
# path: dist/
# - name: Publish package to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1.9
# with:
# password: ${{ secrets.PYPI_TOKEN }}
publish-to-rtd:
name: Publish to Read The Docs
runs-on: ubuntu-latest
steps:
- uses: rtfd/readthedocs-action@v1
with:
token: ${{ secrets.RTD_TOKEN }}
version: ${{ github.ref_name }}