-
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (44 loc) · 1.16 KB
/
build-artifacts.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
46
47
48
49
50
51
52
53
54
55
56
57
58
---
name: build_artifacts
# yamllint disable-line rule:line-length
on:
workflow_dispatch:
# set the run-name
run-name: ${{ github.ref_name }} -> build_artifacts (
${{ github.run_attempt }}
)
jobs:
build_artifacts:
name: build_artifacts
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Echo current date and time
id: datetime
run: |
echo "datetime: $(date '+%Y-%m-%d %H:%M:%S')"
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Update pip and install hatch
run: |
export PIP_ROOT_USER_ACTION=ignore
pip install --upgrade pip
pip install hatch
- name: Get version
id: get_version
run: |
export version=$(hatch version)
echo "version=$version" >> $GITHUB_OUTPUT
- name: Hatch build
run: hatch build
- name: Archive all artifacts in dist/
uses: actions/upload-artifact@v4
with:
name: dist-v${{ steps.get_version.outputs.version }}
path: dist/