-
Notifications
You must be signed in to change notification settings - Fork 9
46 lines (36 loc) · 1 KB
/
cd.yml
File metadata and controls
46 lines (36 loc) · 1 KB
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: cd
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+*
jobs:
validate-release-tag:
if: github.repository == 'aiidateam/aiida-restapi'
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Validate the tag version against the package version
run: python .github/workflows/validate_release_tag.py $GITHUB_REF
publish:
name: Publish to PyPI
needs: [validate-release-tag]
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install flit
run: pip install flit~=3.4
- name: Build and publish
run: flit publish
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.pypi_token }}