Skip to content

Commit

Permalink
Feat: Update Github Action settings
Browse files Browse the repository at this point in the history
  • Loading branch information
speedcell4 committed Jul 27, 2020
1 parent 5a855b4 commit 843837a
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: mkdocs
name: Build Document by Mkdocs
on:
push:
branches:
Expand All @@ -10,9 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout develop
uses: actions/checkout@v1
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
Expand All @@ -22,5 +22,5 @@ jobs:
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.PERSONAL_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
31 changes: 31 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
4 changes: 2 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: unit-tests
name: Unit Tests

on: [push]

Expand All @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python-version }}"
- name: Install dependencies
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# TorchGlyph

[![Actions Status](https://github.com/speedcell4/torchglyph/workflows/unit-tests/badge.svg)](https://github.com/speedcell4/torchglyph/actions)
![Unit Tests](https://github.com/speedcell4/torchglyph/workflows/Unit%20Tests/badge.svg)
![Upload Python Package](https://github.com/speedcell4/torchglyph/workflows/Upload%20Python%20Package/badge.svg)

## Requirements

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

setup(
name=name,
version='0.1.0',
version='0.1.1',
packages=[package for package in find_packages() if package.startswith(name)],
url=f'https://speedcell4.github.io/torchglyph',
license='MIT',
Expand Down

0 comments on commit 843837a

Please sign in to comment.