-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.36 KB
/
release.yaml
File metadata and controls
51 lines (45 loc) · 1.36 KB
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
name: create release
on:
push:
tags:
- 'v*'
jobs:
python_matrix:
env:
PYTHONIOENCODING: 'utf-8'
PYTHONLEGACYWINDOWSSTDIO: 'utf-8'
PYTHONUTF8: '1'
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04", "ubuntu-22.04", "macos-latest", "windows-latest"]
pythonVersion: ["3.11", "3.10", "3.9", "3.8"]
name: ${{ matrix.os }} - python ${{ matrix.pythonVersion }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.pythonVersion }}
- name: test the project
run: python -m unittest tests/tests.py
- uses: actions/upload-artifact@v4
if: failure()
with:
name: build-artifact-${{ matrix.os }}-${{ matrix.buildType }}-msys-${{ matrix.useMsys }}
path: build
release:
name: "Release candidate"
runs-on: "ubuntu-20.04"
needs: [ python_matrix ]
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: "release"
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.CI_GITHUB_TOKEN }}"
prerelease: ${{ contains(github.ref_name, '-rc') }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1