Skip to content

Commit 423c9f3

Browse files
committed
CI: add job to build wheels and upload them when a release is tagged
1 parent 657747a commit 423c9f3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/build.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# SPDX-FileCopyrightText: 2022 The meson-python developers
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
name: build
6+
on:
7+
- push
8+
- pull_request
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- run: python -m pip install build twine
16+
- run: python -m build
17+
- run: |
18+
[[ "${{ github.ref }}" =~ [0-9]+\.[0-9]+\.[0-9]+(\..*)? ]] && echo "UPLOAD=1" >> $GITHUB_ENV
19+
- run: python -m twine upload dist/*
20+
env:
21+
TWINE_USERNAME: __token__
22+
TWINE_PASSWORD: ${{ secrets.PYPI }}
23+
if: ${{ env.UPLOAD }}

0 commit comments

Comments
 (0)