forked from dagster-io/community-integrations
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.63 KB
/
Copy pathtemplate-release.yml
File metadata and controls
57 lines (48 loc) · 1.63 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
53
54
55
56
57
# References
#
# https://docs.astral.sh/uv/guides/integration/github/
# https://docs.astral.sh/uv/guides/publish/#preparing-your-project-for-packaging
# https://docs.pypi.org/trusted-publishers/adding-a-publisher/
#
name: build-and-release
on:
workflow_call:
inputs:
library_name:
required: true
type: string
working_directory:
required: true
type: string
jobs:
build:
name: python
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install Python
working-directory: ${{ inputs.working_directory }}
run: uv python install
- name: Build
working-directory: ${{ inputs.working_directory }}
run: uv build
# Tag must adhere to naming convention of distributed files. For example, the tag
# `dagster_modal-0.1.2` must match the prefix of the files in the `dist/` folder:
#
# -rw-r--r--@ 2.0K Oct 23 14:06 dagster_modal-0.1.2-py3-none-any.whl
# -rw-r--r--@ 1.6K Oct 23 14:06 dagster_modal-0.1.2.tar.gz
- name: Validate release version
run: python .github/validate-release-version.py "$WORKING_DIRECTORY/dist" "$REF_NAME"
env:
WORKING_DIRECTORY: ${{ inputs.working_directory }}
REF_NAME: ${{ github.ref_name }}
- name: Publish
working-directory: ${{ inputs.working_directory }}
run: uv publish
env:
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}
UV_PUBLISH_URL: ${{ vars.UV_PUBLISH_URL }}