File: publish.yml

package info (click to toggle)
stac-validator 3.10.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,280 kB
  • sloc: python: 3,429; makefile: 35
file content (35 lines) | stat: -rw-r--r-- 797 bytes parent folder | download
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
35
name: Publish

on:
  push:
    tags:
      - "v*.*.*" # Triggers when a tag starting with 'v' followed by version numbers is pushed

jobs:
  build-and-publish:
    name: Build and Publish to PyPI
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Set up Python 3.10
        uses: actions/setup-python@v5
        with:
          python-version: "3.10"

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install setuptools wheel twine build

      - name: Build package
        run: |
          python -m build

      - name: Publish package to PyPI
        env:
          TWINE_USERNAME: "__token__"
          TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
        run: |
          twine upload dist/*