diff options
| author | 2021-12-30 09:51:00 +0100 | |
|---|---|---|
| committer | 2022-01-11 00:00:22 +0100 | |
| commit | bcb77d979d817e1e609adb4d007bbbcc3f61efbd (patch) | |
| tree | 093c5a2914ee0f6e1ec559b3b98725190fee7285 /.github/workflows/python-publish.yml | |
| download | client-1.0.0.tar.gz client-1.0.0.tar.bz2 client-1.0.0.zip | |
Prepare for githubv1.0.0
Diffstat (limited to '.github/workflows/python-publish.yml')
| -rw-r--r-- | .github/workflows/python-publish.yml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..9246d7e --- /dev/null +++ b/.github/workflows/python-publish.yml | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | name: Release | ||
| 2 | |||
| 3 | on: | ||
| 4 | push: | ||
| 5 | tags: | ||
| 6 | - 'v*' | ||
| 7 | pull_request: | ||
| 8 | branches: | ||
| 9 | - 'main' | ||
| 10 | |||
| 11 | jobs: | ||
| 12 | deploy: | ||
| 13 | runs-on: ubuntu-latest | ||
| 14 | steps: | ||
| 15 | - uses: actions/checkout@v2 | ||
| 16 | - name: Set up Python | ||
| 17 | uses: actions/setup-python@v2 | ||
| 18 | with: | ||
| 19 | python-version: '3.10' | ||
| 20 | - name: Set up Node | ||
| 21 | uses: actions/setup-node@v2 | ||
| 22 | with: | ||
| 23 | node-version: '16' | ||
| 24 | - name: Install node dependencies | ||
| 25 | run: | | ||
| 26 | yarn install | ||
| 27 | - name: Install python dependencies | ||
| 28 | run: | | ||
| 29 | python -m pip install --upgrade pip | ||
| 30 | pip install build | ||
| 31 | - name: Build package | ||
| 32 | run: | | ||
| 33 | yarn build | ||
| 34 | python -m build | ||
| 35 | - name: Publish package | ||
| 36 | uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | ||
| 37 | if: github.event_name != 'pull_request' | ||
| 38 | with: | ||
| 39 | user: __token__ | ||
| 40 | password: ${{ secrets.PYPI_API_TOKEN }} | ||
