File: release.yml

package info (click to toggle)
growattserver 1.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 296 kB
  • sloc: python: 1,344; makefile: 2
file content (34 lines) | stat: -rwxr-xr-x 1,015 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Release
on:
  release:
    types:
      - published

jobs:
  release:
    name: Build & Deploy to PyPI
    runs-on: ubuntu-latest
    steps:
      - name: Clone repo
        uses: actions/checkout@v2
#      - name: Ensure latest tag is in setup.py if i forgot
#        run: |
#          sed -i "s/version=\"[0-9\.]*\"/version=\"$(git describe --tags)\"/g" setup.py
#          git config user.name github-actions
#          git config user.email github-actions@github.com
#          git add setup.py
#          git commit -m "Ensure setup.py contains the latest tag"
#          git push
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: 3.9
      - name: Install dependencies
        run: pip install wheel
      - name: Build package
        run: python setup.py sdist bdist_wheel
      - name: Upload package
        uses: pypa/gh-action-pypi-publish@release/v1
        with:
          user: __token__
          password: ${{ secrets.PYPI_API_TOKEN }}