Skip to content

Commit

Permalink
Test 3.13 release build
Browse files Browse the repository at this point in the history
  • Loading branch information
fantix committed Oct 9, 2024
1 parent 851c4e9 commit 24dccaf
Showing 1 changed file with 12 additions and 85 deletions.
97 changes: 12 additions & 85 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,24 @@
name: Release

on:
pull_request:
push:
branches:
- "master"
- "ci"
- "[0-9]+.[0-9x]+*"
paths:
- "immutables/_version.py"

jobs:
validate-release-request:
runs-on: ubuntu-latest
steps:
- name: Validate release PR
uses: edgedb/action-release/validate-pr@master
id: checkver
with:
github_token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
version_file: immutables/_version.py
require_team: Release Managers
require_approval: no
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: 0.20
run: |
mkdir -p dist/
echo "${VERSION}" > dist/VERSION
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: dist
name: dist-version
path: dist/

build-sdist:
Expand All @@ -52,16 +31,16 @@ jobs:
fetch-depth: 50
submodules: true

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5

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

build-wheels-matrix:
Expand All @@ -71,10 +50,10 @@ jobs:
include: ${{ steps.set-matrix.outputs.include }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: pip install cibuildwheel==2.15.0
- run: pip install cibuildwheel==2.21.3
- id: set-matrix
run: |
MATRIX_INCLUDE=$(
Expand Down Expand Up @@ -112,67 +91,15 @@ jobs:
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2

- uses: pypa/cibuildwheel@39a63b5912f086dd459cf6fcb13dcdd3fe3bc24d # v2.15.0
- uses: pypa/cibuildwheel@7940a4c0e76eb2030e473a5f864f291f63ee879b # v2.21.3
with:
only: ${{ matrix.only }}
env:
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT: "IMMU_SKIP_MYPY_TESTS=1"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dist
name: dist-${{ matrix.only }}
path: wheelhouse/*.whl

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

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 5
submodules: false

- uses: actions/download-artifact@v2
with:
name: dist
path: dist/

- name: Extract Release Version
id: relver
run: |
set -e
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: false

- run: |
ls -al dist/
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
# password: ${{ secrets.TEST_PYPI_TOKEN }}
# repository_url: https://test.pypi.org/legacy/

0 comments on commit 24dccaf

Please sign in to comment.