Skip to content

Commit

Permalink
chore: update ci (#267)
Browse files Browse the repository at this point in the history
* chore: update ci

Signed-off-by: Keming <kemingy94@gmail.com>

* rm py311 test

Signed-off-by: Keming <kemingy94@gmail.com>

Signed-off-by: Keming <kemingy94@gmail.com>
  • Loading branch information
kemingy authored Oct 15, 2022
1 parent ebcb3d6 commit ccac6d8
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 25 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ name: Upload Python Package

on:
release:
types: [created]
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
Expand All @@ -21,10 +24,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools wheel twine build
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
make publish
pip install -U build
- name: Build
run: make package
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
40 changes: 26 additions & 14 deletions .github/workflows/pythondoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,29 @@ on:
- 'spectree/**'
- 'docs/**'
- '.github/workflows/pythondoc.yml'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

jobs:
build:

runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
Expand All @@ -28,18 +43,15 @@ jobs:
pip install Sphinx furo
make install
- name: Generate docs
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
make doc
cd docs/build/html
git config --global url."https://".insteadOf git://
git config --global url."https://github.com/".insteadOf git@github.com:
remote_repo="https://${GITHUB_ACTOR}:${TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
remote_branch=gh-pages
git init
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Deploy GitHub Pages"
git push --force "${remote_repo}" master:${remote_branch}
touch .nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: 'docs/build/html'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
6 changes: 6 additions & 0 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ on:
branches:
- master
- dev
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
lint:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

setup(
name="spectree",
version="1.0.0a1",
version="1.0.0a2",
license="Apache-2.0",
author="Keming Yang",
author_email="kemingy94@gmail.com",
Expand Down

0 comments on commit ccac6d8

Please sign in to comment.