-
Notifications
You must be signed in to change notification settings - Fork 948
47 lines (44 loc) · 1.1 KB
/
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
42
43
44
45
46
47
name: Releases
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Setup tox
run: pip install tox
- name: Run linter
run: tox -e lint
- name: Run tests
run: tox -e py
- name: Build package
run: tox -e build
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: dist/gspread-*
token: ${{ secrets.GH_TOKEN }}
generateReleaseNotes: True
artifactErrorsFailBuild: True
- name: Publish to TestPyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
verbose: true
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}