File: deploy.yml

package info (click to toggle)
python-autobahn 24.4.2%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,468 kB
  • sloc: python: 38,615; javascript: 2,705; makefile: 904; ansic: 373; sh: 64
file content (54 lines) | stat: -rw-r--r-- 1,224 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: deploy

on:
  # Trigger this workflow when the "main" workflow has completed successfully
  # https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_run
  workflow_run:
    workflows:
      - main
    branches:
      - master
    types:
      - completed
  push:
    tags:
      - 'v[0-9]+.[0-9]+.[0-9]+'

jobs:

  build_wheels:
    name: Build & Upload
    runs-on: ubuntu-22.04
    steps:
    - uses: actions/checkout@v3

    - name: Set up Python 3.x
      uses: actions/setup-python@v4
      with:
        python-version: '3.x'
        architecture: 'x64'

    - name: Upgrade pip
      run: |
        python3 -m pip install --upgrade pip

    - name: Install build
      run:
        pip3 install --upgrade build

    - name: Build wheel & sdist
      run: |
        python3 -m build --wheel --sdist

    - uses: actions/upload-artifact@v3
      with:
        name: built-packages
        path: |
          ./dist/*.whl
          ./dist/*.tar.gz

    - name: Publish to Pypi
      if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
      uses: pypa/gh-action-pypi-publish@release/v1
      with:
        password: ${{ secrets.PYPI_API_TOKEN }}