Debian Codegraph @

.github/workflows/release.yml

raw
1 name: Release
2
3 on:
4 push:
5 tags:
6 - '**'
7
8 jobs:
9 release:
10 runs-on: ubuntu-latest
11 steps:
12 - uses: actions/checkout@v3
13
14 - name: Get tag
15 id: tag
16 run: |
17 echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
18
19 - name: Set up Python 3.7
20 uses: actions/setup-python@v4
21 with:
22 python-version: 3.7
23
24 - name: Install dependencies
25 run: python -m pip install --upgrade pip poetry
26
27 - name: Build project
28 run: poetry build
29
30 - name: Publish release to PyPI
31 env:
32 POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
33 run: |
34 poetry publish
35
36 - name: Create Release
37 id: create_release
38 uses: actions/create-release@v1
39 env:
40 GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
41 with:
42 tag_name: ${{ steps.tag.outputs.tag }}
43 release_name: ${{ steps.tag.outputs.tag }}
44 draft: false
45 prerelease: false