-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1008 Bytes
/
Copy pathpre-release.yml
File metadata and controls
49 lines (39 loc) · 1008 Bytes
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
name: Pre-release cosy-luigi
on:
workflow_dispatch:
permissions:
id-token: write
concurrency:
group: pre-release
cancel-in-progress: true
jobs:
pre-release-checks:
if: github.ref == 'refs/heads/develop'
uses: ./.github/workflows/checks.yml
pre-release-pypi:
if: github.ref == 'refs/heads/develop'
needs: [pre-release-checks]
environment: pre-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
# Full history for timestamps
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: '3.12'
- name: Install Hatch
uses: pypa/hatch@install
- name: Check for Dev
run: |
hatch_version="$(hatch version)"
if [[ ! $hatch_version =~ "dev" ]]; then
exit 1
fi
- name: Build Package
run: hatch build
# Uses OpenID Connect
- name: Publish Package
uses: pypa/gh-action-pypi-publish@release/v1