Skip to content

Commit abaaedd

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

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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: if [[ "${{ github.ref }}" =~ [0-9]+\.[0-9]+\.[0-9]+(\..*)? ]]; then echo "UPLOAD=1" >> $GITHUB_ENV; fi
18+
- run: python -m twine upload dist/*
19+
env:
20+
TWINE_USERNAME: __token__
21+
TWINE_PASSWORD: ${{ secrets.PYPI }}
22+
if: ${{ env.UPLOAD }}

0 commit comments

Comments
 (0)