-
Notifications
You must be signed in to change notification settings - Fork 12
52 lines (38 loc) · 1.22 KB
/
cd.yml
File metadata and controls
52 lines (38 loc) · 1.22 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
47
48
49
50
51
52
name: cd
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
jobs:
validate-release-tag:
if: github.repository == 'aiidateam/aiida-hyperqueue'
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- 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
environment: deployment
permissions:
id-token: write
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install flit
run: pip install flit~=3.8
- name: Build with flit
run: flit build
- name: Publish to PyPI using Trusted Publishing
uses: pypa/gh-action-pypi-publish@release/v1