-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (38 loc) · 1.04 KB
/
create_release.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
name: Create Release
on:
workflow_dispatch:
push:
tags:
- v*
env:
python: 3.11
jobs:
test:
uses: ./.github/workflows/tests.yaml
release:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
- name: Get version using setuptools
id: get_version
run: |
echo ::set-output name=version::$(python setup.py --version)
- name: Create release
uses: ncipollo/release-action@v1
with:
tag: v${{ steps.get_version.outputs.version }}
prerelease: ${{ contains(steps.get_version.outputs.version, '-')}}
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
publish:
needs: release
uses: ./.github/workflows/pypi.yaml