Skip to content

Commit c6fe454

Browse files
committed
Fix GitHub action warning
Signed-off-by: Bernát Gábor <[email protected]>
1 parent 2b38b35 commit c6fe454

File tree

3 files changed

+149
-136
lines changed

3 files changed

+149
-136
lines changed

Diff for: .github/workflows/pyproject_fmt_build.yaml

+142-136
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,20 @@ jobs:
4141
crate: cargo-edit
4242
- uses: actions/checkout@v4
4343
- name: Bump version
44-
run:
45-
cargo set-version -p pyproject-fmt --bump '${{ github.event.inputs.release == 'no' ||
46-
github.event.inputs.release == null && 'patch' || github.event.inputs.release }}'
44+
run: cargo set-version -p pyproject-fmt --bump '${{ github.event.inputs.release == 'no' || github.event.inputs.release == null && 'patch' || github.event.inputs.release }}'
4745
- name: Install the latest version of uv
4846
uses: astral-sh/setup-uv@v3
4947
with:
5048
enable-cache: true
5149
cache-dependency-glob: "tasks/changelog.py"
5250
- name: Generate changelog
5351
id: get-version
54-
run:
55-
uv run tasks/changelog.py pyproject-fmt "${{ github.event.number }}" "${{ github.event.pull_request.base.sha
56-
}}"
52+
run: uv run tasks/changelog.py pyproject-fmt "${{ github.event.number }}" "${{ github.event.pull_request.base.sha }}"
5753
env:
5854
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
5955
- uses: actions/setup-python@v5
56+
with:
57+
python-version: "3.13"
6058
- uses: pre-commit/[email protected]
6159
continue-on-error: true
6260
- name: Show changes to the repository
@@ -70,132 +68,126 @@ jobs:
7068
retention-days: 1
7169
if-no-files-found: "error"
7270

73-
linux:
74-
needs: [bump]
75-
runs-on: ${{ matrix.platform.runner }}
76-
strategy:
77-
fail-fast: false
78-
matrix:
79-
platform:
80-
- runner: ubuntu-latest
81-
target: x86_64
82-
interpreter: "3.8 pypy3.8 pypy3.9 pypy3.10"
83-
- runner: ubuntu-latest
84-
target: x86
85-
- runner: ubuntu-latest
86-
target: x86_64-unknown-linux-musl
87-
manylinux: musllinux_1_1
88-
- runner: ubuntu-latest
89-
target: i686-unknown-linux-musl
90-
manylinux: musllinux_1_1
91-
- runner: ubuntu-latest
92-
target: aarch64
93-
- runner: ubuntu-latest
94-
target: armv7
95-
- runner: ubuntu-latest
96-
target: s390x
97-
- runner: ubuntu-latest
98-
target: ppc64le
99-
steps:
100-
- name: Download the code
101-
uses: actions/download-artifact@v4
102-
with:
103-
name: source
104-
- name: Build wheels
105-
uses: PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
106-
107-
with:
108-
target: ${{ matrix.platform.target }}
109-
args:
110-
-m pyproject-fmt/Cargo.toml --release --out dist --interpreter ${{ matrix.platform.interpreter || '3.8' }}
111-
--target-dir target
112-
sccache: "true"
113-
manylinux: ${{ matrix.platform.manylinux || 'auto' }}
114-
- name: Upload wheels
115-
uses: actions/upload-artifact@v4
116-
with:
117-
name: wheels-linux-${{ matrix.platform.target }}
118-
path: dist
119-
120-
windows:
121-
needs: [bump]
122-
runs-on: ${{ matrix.platform.runner }}
123-
strategy:
124-
matrix:
125-
platform:
126-
- runner: windows-latest
127-
target: x64
128-
- runner: windows-latest
129-
target: x86
130-
steps:
131-
- name: Download the code
132-
uses: actions/download-artifact@v4
133-
with:
134-
name: source
135-
- name: Build wheels
136-
uses: PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
137-
138-
with:
139-
target: ${{ matrix.platform.target }}
140-
args:
141-
-m pyproject-fmt/Cargo.toml --release --out dist --interpreter ${{ matrix.platform.interpreter || '3.8' }}
142-
--target-dir target
143-
sccache: "true"
144-
- name: Upload wheels
145-
uses: actions/upload-artifact@v4
146-
with:
147-
name: wheels-windows-${{ matrix.platform.target }}
148-
path: dist
149-
150-
macos:
151-
needs: [bump]
152-
runs-on: ${{ matrix.platform.runner }}
153-
strategy:
154-
matrix:
155-
platform:
156-
- runner: macos-latest
157-
target: x86_64
158-
- runner: macos-14
159-
target: aarch64
160-
steps:
161-
- name: Download the code
162-
uses: actions/download-artifact@v4
163-
with:
164-
name: source
165-
- name: Build wheels
166-
uses: PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
167-
168-
with:
169-
target: ${{ matrix.platform.target }}
170-
args:
171-
-m pyproject-fmt/Cargo.toml --release --out dist --interpreter "3.8 pypy3.8 pypy3.9 pypy3.10" --target-dir
172-
target
173-
sccache: "true"
174-
- name: Upload wheels
175-
uses: actions/upload-artifact@v4
176-
with:
177-
name: wheels-macos-${{ matrix.platform.target }}
178-
path: dist
179-
180-
sdist:
181-
needs: [bump]
182-
runs-on: ubuntu-latest
183-
steps:
184-
- name: Download the code
185-
uses: actions/download-artifact@v4
186-
with:
187-
name: source
188-
- name: Build sdist
189-
uses: PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
190-
191-
with:
192-
command: sdist
193-
args: -m pyproject-fmt/Cargo.toml --out dist
194-
- name: Upload sdist
195-
uses: actions/upload-artifact@v4
196-
with:
197-
name: wheels-sdist
198-
path: dist
71+
# linux:
72+
# needs: [bump]
73+
# runs-on: ${{ matrix.platform.runner }}
74+
# strategy:
75+
# fail-fast: false
76+
# matrix:
77+
# platform:
78+
# - runner: ubuntu-latest
79+
# target: x86_64
80+
# interpreter: "3.8 pypy3.8 pypy3.9 pypy3.10"
81+
# - runner: ubuntu-latest
82+
# target: x86
83+
# - runner: ubuntu-latest
84+
# target: x86_64-unknown-linux-musl
85+
# manylinux: musllinux_1_1
86+
# - runner: ubuntu-latest
87+
# target: i686-unknown-linux-musl
88+
# manylinux: musllinux_1_1
89+
# - runner: ubuntu-latest
90+
# target: aarch64
91+
# - runner: ubuntu-latest
92+
# target: armv7
93+
# - runner: ubuntu-latest
94+
# target: s390x
95+
# - runner: ubuntu-latest
96+
# target: ppc64le
97+
# steps:
98+
# - name: Download the code
99+
# uses: actions/download-artifact@v4
100+
# with:
101+
# name: source
102+
# - name: Build wheels
103+
# uses: PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
104+
#
105+
# with:
106+
# target: ${{ matrix.platform.target }}
107+
# args: -m pyproject-fmt/Cargo.toml --release --out dist --interpreter ${{ matrix.platform.interpreter || '3.8' }} --target-dir target
108+
# sccache: "true"
109+
# manylinux: ${{ matrix.platform.manylinux || 'auto' }}
110+
# - name: Upload wheels
111+
# uses: actions/upload-artifact@v4
112+
# with:
113+
# name: wheels-linux-${{ matrix.platform.target }}
114+
# path: dist
115+
#
116+
# windows:
117+
# needs: [bump]
118+
# runs-on: ${{ matrix.platform.runner }}
119+
# strategy:
120+
# matrix:
121+
# platform:
122+
# - runner: windows-latest
123+
# target: x64
124+
# - runner: windows-latest
125+
# target: x86
126+
# steps:
127+
# - name: Download the code
128+
# uses: actions/download-artifact@v4
129+
# with:
130+
# name: source
131+
# - name: Build wheels
132+
# uses: PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
133+
#
134+
# with:
135+
# target: ${{ matrix.platform.target }}
136+
# args: -m pyproject-fmt/Cargo.toml --release --out dist --interpreter ${{ matrix.platform.interpreter || '3.8' }} --target-dir target
137+
# sccache: "true"
138+
# - name: Upload wheels
139+
# uses: actions/upload-artifact@v4
140+
# with:
141+
# name: wheels-windows-${{ matrix.platform.target }}
142+
# path: dist
143+
#
144+
# macos:
145+
# needs: [bump]
146+
# runs-on: ${{ matrix.platform.runner }}
147+
# strategy:
148+
# matrix:
149+
# platform:
150+
# - runner: macos-latest
151+
# target: x86_64
152+
# - runner: macos-14
153+
# target: aarch64
154+
# steps:
155+
# - name: Download the code
156+
# uses: actions/download-artifact@v4
157+
# with:
158+
# name: source
159+
# - name: Build wheels
160+
# uses: PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
161+
#
162+
# with:
163+
# target: ${{ matrix.platform.target }}
164+
# args: -m pyproject-fmt/Cargo.toml --release --out dist --interpreter "3.8 pypy3.8 pypy3.9 pypy3.10" --target-dir target
165+
# sccache: "true"
166+
# - name: Upload wheels
167+
# uses: actions/upload-artifact@v4
168+
# with:
169+
# name: wheels-macos-${{ matrix.platform.target }}
170+
# path: dist
171+
#
172+
# sdist:
173+
# needs: [bump]
174+
# runs-on: ubuntu-latest
175+
# steps:
176+
# - name: Download the code
177+
# uses: actions/download-artifact@v4
178+
# with:
179+
# name: source
180+
# - name: Build sdist
181+
# uses: PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
182+
#
183+
# with:
184+
# command: sdist
185+
# args: -m pyproject-fmt/Cargo.toml --out dist
186+
# - name: Upload sdist
187+
# uses: actions/upload-artifact@v4
188+
# with:
189+
# name: wheels-sdist
190+
# path: dist
199191

200192
release:
201193
name: Release
@@ -206,25 +198,39 @@ jobs:
206198
permissions:
207199
id-token: write
208200
contents: write
209-
if: github.event.inputs.release != 'no' && github.event.inputs.release != null && github.ref == 'main'
210-
needs: [linux, windows, macos, sdist, bump]
201+
if: github.event.inputs.release != 'no' && github.event.inputs.release != null && github.ref == 'refs/heads/main'
202+
needs: [bump]
211203
steps:
212204
- uses: actions/checkout@v4
213-
- uses: actions/download-artifact@v4
205+
- name: Download source
206+
uses: actions/download-artifact@v4
207+
with:
208+
name: source
209+
path: .
214210
- name: Show changes to the repository
215211
run: git diff HEAD -u
212+
- name: Show wheels
213+
run: ls -lath .
216214
- name: Commit changes
217215
run: |
218216
git config --global user.name 'Bernat Gabor'
219217
git config --global user.email '[email protected]'
220218
git commit -am "Release pyproject-fmt ${{needs.bump.outputs.version}}"
221219
- name: Tag release
222220
run: git tag pyproject-fmt/${{needs.bump.outputs.version}}
221+
- name: Download wheels
222+
uses: actions/download-artifact@v4
223+
with:
224+
pattern: wheels-*
225+
path: dist
226+
merge-multiple: 'true'
227+
- name: Show wheels
228+
run: ls -lath dist && exit 1
223229
- name: Publish to PyPI
224230
uses: PyO3/maturin-action@e21013af641daf9513198d98a6853760803a5c6c
225231
with:
226232
command: upload
227-
args: --non-interactive --skip-existing wheels-*/*
233+
args: --non-interactive --skip-existing dist/*
228234
- name: Push release commit+tag and create GitHub release
229235
env:
230236
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/target
33
/pyproject-fmt/.tox
44
/pyproject-fmt/dist
5+
/dist

Diff for: .pre-commit-config.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ repos:
2929
rev: "v3.3.3"
3030
hooks:
3131
- id: prettier
32+
name: Prettier non-workflow files
3233
args: ["--print-width=120", "--prose-wrap=always"]
34+
exclude: ".github/workflows/"
35+
- id: prettier
36+
name: Prettier workflow files
37+
args: ["--print-width=240", "--prose-wrap=always"]
38+
exclude: "^(?!.github/workflows/)"
3339
- repo: meta
3440
hooks:
3541
- id: check-hooks-apply

0 commit comments

Comments
 (0)