Skip to content

Commit 8dd3954

Browse files
committed
ci: release pypi
1 parent cbc3a2e commit 8dd3954

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
# on:
4+
# release:
5+
# types: [created]
6+
on:
7+
push:
8+
tags:
9+
- '*.*.*'
10+
11+
jobs:
12+
build-n-publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: '3.x'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install setuptools wheel twine poetry
26+
poetry install
27+
28+
- name: Get the version from the tag
29+
id: get_version
30+
run: echo "::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}"
31+
32+
- name: Update version in pyproject.toml
33+
run: |
34+
version=${{ steps.get_version.outputs.VERSION }}
35+
poetry version $version
36+
37+
- name: Build a binary wheel and a source tarball
38+
run: poetry build
39+
40+
- name: Publish distribution 📦 to PyPI
41+
uses: pypa/gh-action-pypi-publish@release/v1
42+
with:
43+
password: ${{ secrets.PYPI_API_TOKEN }}
44+
packages-dir: dist

uiviewer/static/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div class="header">
1818
<div style="margin-right: 20px;">
1919
<span style="font-weight: bold; font-size: 20px;">UI Viewer</span>
20-
<span> 2.0.3</span>
20+
<span> 1.0.0</span>
2121
</div>
2222
<el-select
2323
v-model="platform"

0 commit comments

Comments
 (0)