-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (54 loc) · 1.54 KB
/
release.yml
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: Release
on:
release:
types:
- published
jobs:
test:
name: Test and publish
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Setup poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.2.2'
- name: Extract version
id: extract-version
run: |
version="$(./scripts/version.sh show -t)"
echo "::set-output name=version::$version"
poetry version "$version"
- name: Install dependencies
run: poetry install --all-extras
- name: Lint
run: |
poetry run black . --check
poetry run flake8
poetry run mypy .
- name: Register specifications
run: ./scripts/specifications.sh register
env:
OPVIOUS_TOKEN: ${{ secrets.OPVIOUS_TOKEN }}
- name: Test
run: poetry run pytest
env:
OPVIOUS_TOKEN: ${{ secrets.OPVIOUS_TOKEN }}
- name: Publish
run: poetry publish --build
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
- name: Create tag
uses: pkgdeps/git-tag-action@v2
with:
git_commit_sha: ${{ github.sha }}
git_tag_prefix: v
github_repo: ${{ github.repository }}
github_token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ steps.extract-version.outputs.version }}