"git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "23e2e83b5e300a5c4b527276880e2abf3a690896"
Unverified Commit 1c4e4a34 authored by Hang Zhang's avatar Hang Zhang Committed by GitHub
Browse files

master doc build & pypi release (#276)

parent b8d83b0d
# 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: Pypi Release
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine pypandoc
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.pypi_username }}
TWINE_PASSWORD: ${{ secrets.pypi_password }}
RELEASE: 1
run: |
python setup.py sdist bdist_wheel
twine upload dist/* --verbose
...@@ -43,7 +43,7 @@ jobs: ...@@ -43,7 +43,7 @@ jobs:
# https://github.com/marketplace/actions/github-pages # https://github.com/marketplace/actions/github-pages
- name: Deploy - name: Deploy
if: success() if: success()
uses: crazy-max/ghaction-github-pages@master uses: crazy-max/ghaction-github-pages@v1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
......
...@@ -178,7 +178,8 @@ def test(args): ...@@ -178,7 +178,8 @@ def test(args):
outname = os.path.splitext(impath)[0] + '.png' outname = os.path.splitext(impath)[0] + '.png'
mask.save(os.path.join(outdir, outname)) mask.save(os.path.join(outdir, outname))
print( 'pixAcc: %.4f, mIoU: %.4f' % (pixAcc, mIoU)) if args.eval:
print( 'pixAcc: %.4f, mIoU: %.4f' % (pixAcc, mIoU))
class ReturnFirstClosure(object): class ReturnFirstClosure(object):
def __init__(self, data): def __init__(self, data):
......
...@@ -18,10 +18,11 @@ cwd = os.path.dirname(os.path.abspath(__file__)) ...@@ -18,10 +18,11 @@ cwd = os.path.dirname(os.path.abspath(__file__))
version = '1.2.0' version = '1.2.0'
try: try:
from datetime import date if not os.getenv('RELEASE'):
today = date.today() from datetime import date
day = today.strftime("b%Y%m%d") today = date.today()
version += day day = today.strftime("b%Y%m%d")
version += day
except Exception: except Exception:
pass pass
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment