Skip to content

Commit

Permalink
Release 1.9.0 wheels for Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
fantix committed Jul 23, 2024
1 parent 89ed5a1 commit 075bf35
Showing 1 changed file with 12 additions and 70 deletions.
82 changes: 12 additions & 70 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Release

on:
workflow_dispatch:
inputs: {}

pull_request:
branches:
- "master"
Expand All @@ -15,26 +18,9 @@ jobs:
outputs:
version: ${{ steps.checkver.outputs.version }}
steps:
- name: Validate release PR
uses: edgedb/action-release/validate-pr@master
id: checkver
with:
github_token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
require_team: Release Managers
require_approval: no
version_file: edgedb/_version.py
version_line_pattern: |
__version__\s*=\s*(?:['"])([[:PEP440:]])(?:['"])
- name: Stop if not approved
if: steps.checkver.outputs.approved != 'true'
run: |
echo ::error::PR is not approved yet.
exit 1
- name: Store release version for later use
env:
VERSION: ${{ steps.checkver.outputs.version }}
VERSION: 1.9.0
run: |
mkdir -p dist/
echo "${VERSION}" > dist/VERSION
Expand All @@ -44,32 +30,6 @@ jobs:
name: dist
path: dist/

build-sdist:
needs: validate-release-request
runs-on: ubuntu-latest

env:
PIP_DISABLE_PIP_VERSION_CHECK: 1

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 50
submodules: true

- name: Set up Python
uses: actions/setup-python@v2

- name: Build source distribution
run: |
pip install -U setuptools wheel pip
python setup.py sdist
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*.tar.*

build-wheels-matrix:
needs: validate-release-request
runs-on: ubuntu-latest
Expand All @@ -80,15 +40,15 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- run: pip install cibuildwheel==2.12.3
- run: pip install cibuildwheel==2.19.1
- id: set-matrix
# Cannot test on Musl distros yet.
run: |
MATRIX_INCLUDE=$(
{
cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | grep many | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \
&& cibuildwheel --print-build-identifiers --platform macos --arch x86_64,arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-latest"}' \
&& cibuildwheel --print-build-identifiers --platform windows --arch AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-2019"}'
cibuildwheel --print-build-identifiers --platform linux --arch x86_64,aarch64 | grep cp | grep many | grep 312 | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \
&& cibuildwheel --print-build-identifiers --platform macos --arch x86_64,arm64 | grep cp | grep 312 | jq -nRc '{"only": inputs, "os": "macos-latest"}' \
&& cibuildwheel --print-build-identifiers --platform windows --arch AMD64 | grep cp | grep 312 | jq -nRc '{"only": inputs, "os": "windows-2019"}'
} | jq -sc
)
echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -130,7 +90,7 @@ jobs:
- name: Install EdgeDB
uses: edgedb/setup-edgedb@v1

- uses: pypa/cibuildwheel@v2.16.5
- uses: pypa/cibuildwheel@v2.19.1
with:
only: ${{ matrix.only }}
env:
Expand All @@ -154,8 +114,10 @@ jobs:
path: wheelhouse/*.whl

publish:
needs: [build-sdist, build-wheels]
needs: [build-wheels]
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v3
Expand All @@ -175,26 +137,6 @@ jobs:
echo ::set-output name=version::$(cat dist/VERSION)
rm dist/VERSION
- name: Merge and tag the PR
uses: edgedb/action-release/merge@master
with:
github_token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
ssh_key: ${{ secrets.RELEASE_BOT_SSH_KEY }}
gpg_key: ${{ secrets.RELEASE_BOT_GPG_KEY }}
gpg_key_id: "5C468778062D87BF!"
tag_name: v${{ steps.relver.outputs.version }}

- name: Publish Github Release
uses: elprans/gh-action-create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.relver.outputs.version }}
release_name: v${{ steps.relver.outputs.version }}
target: ${{ github.event.pull_request.base.ref }}
body: ${{ github.event.pull_request.body }}
draft: true

- run: |
ls -al dist/
Expand Down

0 comments on commit 075bf35

Please sign in to comment.