-
Notifications
You must be signed in to change notification settings - Fork 949
46 lines (43 loc) · 1.07 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
name: Releases
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- 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/
- name: Publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}