-
Notifications
You must be signed in to change notification settings - Fork 71
45 lines (41 loc) · 1.1 KB
/
snapshot-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
name: Python package
on:
# Publish snapshot release every night.
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
index:
type: choice
description: Index to publish snapshot release to
options:
- https://test.pypi.org/simple/
- https://pypi.org/simple/
default: https://test.pypi.org/simple/
jobs:
build:
runs-on: ubuntu-latest
name: Pre Release
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: "3.10"
- name: Install tox-gh
run: pip install tox-gh
- name: Setup test environment
run: tox run --notest
- name: Test with PyTest
run: tox run
- name: Test building package
run: tox run -e build
- name: Publish package
uses: pypa/gh-action-pypi-publish/v1
env:
SNAPSHOT_RELEASE: 1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
repository-url: ${{ github.event.inputs.index }}