Skip to content

Commit

Permalink
change branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexseal committed Jan 26, 2024
1 parent c0402ab commit a1a15ce
Showing 1 changed file with 2 additions and 66 deletions.
68 changes: 2 additions & 66 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: build-and-publish

on:
push:
branches: [main]
branches: [testing]
tags: ['v*']

jobs:
Expand All @@ -27,70 +27,6 @@ jobs:
name: wheels-${{ matrix.os }}-${{ matrix.pyver }}-${{ strategy.job-index }}
path: wheelhouse/*
- name: Test
# install the built wheels for python 3.10
run: |
python -m pip install --user wheelhouse/*cp310*.whl
python -m pip install --user wheelhouse/*.whl
python -m unittest discover -v -s mplib/tests
build-sdist:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "true"
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install pypa/build
run: "python -m pip install build --user"
- name: Build a source tarball
run: "python -m build --sdist"
- name: Upload sdist artifacts
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*

nightly-release:
if: startsWith(github.ref, 'refs/heads/') # if a commit is pushed
needs: [build-and-test, build-sdist]
runs-on: ubuntu-latest
permissions:
contents: write # create nightly release
steps:
- name: Download wheel artifacts
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
- name: Update Nightly Release
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nightly
name: 'Nightly Release'
prerelease: true
body: 'MPlib development nightly release. This release is mainly for internal testing. Stable releases are published to pypi https://pypi.org/p/mplib/'
files: |
dist/*
publish-pypi:
if: startsWith(github.ref, 'refs/tags/v') # if a tag is pushed
needs: build
runs-on: ubuntu-latest
environment: pypi_publish
permissions:
id-token: write # mandatory for PyPI trusted publishing
steps:
- name: Download wheel artifacts
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/

0 comments on commit a1a15ce

Please sign in to comment.