-
Notifications
You must be signed in to change notification settings - Fork 20
69 lines (64 loc) · 1.99 KB
/
Copy pathtoml_fmt_common_build.yaml
File metadata and controls
69 lines (64 loc) · 1.99 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
58
59
60
61
62
63
64
65
66
67
68
69
name: 📦 toml-fmt-common
on:
push:
branches: ["main"]
pull_request:
schedule:
- cron: "0 8 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
changes:
name: 🔍 changes
runs-on: ubuntu-latest
outputs:
run: ${{ github.event_name != 'pull_request' || steps.filter.outputs.run == 'true' }}
steps:
- name: 📥 Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: 🔍 Check for changes
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
filters: |
run:
- 'toml-fmt-common/**'
- '.github/workflows/toml_fmt_common_build.yaml'
build:
name: 🔨 build
needs: changes
if: needs.changes.outputs.run == 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: toml-fmt-common
steps:
- name: 📥 Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: 📦 Setup uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: 🔨 Build package
run: uv build --python 3.14 --python-preference only-managed --sdist --wheel . --out-dir dist
all-pass:
name: ✅ toml-fmt-common-build
if: always()
needs: [changes, build]
runs-on: ubuntu-latest
steps:
- name: Decide whether all jobs passed or were skipped
run: |
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "Some jobs failed or were canceled"
exit 1
fi
echo "All jobs passed or were skipped"