Skip to content

Commit

Permalink
Force custom dist build for now
Browse files Browse the repository at this point in the history
Until we can safely submit a PR to the original repo, we build a version
that we need
  • Loading branch information
romain-h committed Feb 8, 2024
1 parent 221096d commit 9276e92
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 72 deletions.
141 changes: 70 additions & 71 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Build wheels
on:
pull_request:
push:
branches:
- 'build-support-struct'
tags:
- "v*"

Expand Down Expand Up @@ -40,7 +42,7 @@ jobs:
matrix:
# Windows isn't working right now: https://github.com/caketop/python-starlark-go/issues/4
os: [ubuntu-latest, macos-latest]
cibw_python: ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*"]
cibw_python: ["cp38-*"]
cibw_arch: ["i686", "x86_64", "aarch64", "arm64"]
include:
- cibw_arch: arm64
Expand All @@ -56,9 +58,6 @@ jobs:
cibw_arch: i686
- os: macos-latest
cibw_arch: aarch64
- os: macos-latest
cibw_python: "cp37-*"
cibw_arch: arm64

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -86,74 +85,74 @@ jobs:
path: wheelhouse/starlark_go-*.whl

# Create a GitHub release
github_release:
name: Create GitHub release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: "✏️ Generate release changelog"
id: changelog
uses: heinrichreimer/[email protected]
with:
filterByMilestone: false
onlyLastTag: true
pullRequests: true
prWoLabels: true
token: ${{ secrets.GITHUB_TOKEN }}
verbose: true

- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
body: ${{ steps.changelog.outputs.changelog }}
files: dist/**/*
# github_release:
# name: Create GitHub release
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# needs: [build_wheels, build_sdist]
# runs-on: ubuntu-latest
# permissions:
# contents: write

# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0

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

# - name: "✏️ Generate release changelog"
# id: changelog
# uses: heinrichreimer/[email protected]
# with:
# filterByMilestone: false
# onlyLastTag: true
# pullRequests: true
# prWoLabels: true
# token: ${{ secrets.GITHUB_TOKEN }}
# verbose: true

# - name: Create GitHub release
# uses: softprops/action-gh-release@v1
# with:
# body: ${{ steps.changelog.outputs.changelog }}
# files: dist/**/*

# Test PyPI
test_pypi_publish:
name: Test publishing to PyPI
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest

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

- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
# test_pypi_publish:
# name: Test publishing to PyPI
# needs: [build_wheels, build_sdist]
# runs-on: ubuntu-latest

# steps:
# - uses: actions/download-artifact@v3
# with:
# name: artifact
# path: dist

# - uses: pypa/[email protected]
# with:
# user: __token__
# password: ${{ secrets.TEST_PYPI_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
# skip_existing: true

# Publish to PyPI
pypi_publish:
name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest

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

- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
# pypi_publish:
# name: Publish to PyPI
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# needs: [build_wheels, build_sdist]
# runs-on: ubuntu-latest

# steps:
# - uses: actions/download-artifact@v3
# with:
# name: artifact
# path: dist

# - uses: pypa/[email protected]
# with:
# user: __token__
# password: ${{ secrets.PYPI_TOKEN }}
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[metadata]
name = starlark-go
name = starlark-go-monzo
description = Python bindings for the Go implementation of Starlark
long_description = file:README.md
long_description_content_type = text/markdown
Expand Down

0 comments on commit 9276e92

Please sign in to comment.