-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (51 loc) · 1.56 KB
/
check and publish.yaml
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: check and publish
on: push
permissions:
contents: "write"
packages: "write"
pull-requests: "read"
jobs:
check:
strategy:
fail-fast: false
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- run: ./pw pdm lock --check
- run: ./pw pdm install
- run: ./pw run mypy -p pytest_robotframework
- run: ./pw run mypy tests
- run: ./pw run pyright
- run: ./pw run black --check --diff .
- run: ./pw run ruff .
- run: ./pw run pylint pytest_robotframework tests
- run: ./pw test
- run: ./pw run robocop
- run: ./pw run robotidy --color --check --diff .
publish:
runs-on: "ubuntu-latest"
if: github.ref == 'refs/heads/master'
needs: check
permissions:
id-token: write
contents: write
packages: write
pull-requests: read
steps:
- uses: actions/checkout@v2
- run: ./pw pdm publish
- name: get version number
id: current-version
run: echo ::set-output name=CURRENT_VERSION::$(./pw pdm show --version)
- uses: marvinpinto/action-automatic-releases@v1.2.1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
files: dist/*
automatic_release_tag: ${{ steps.current-version.outputs.CURRENT_VERSION }}