Skip to content

Commit

Permalink
add release stage
Browse files Browse the repository at this point in the history
  • Loading branch information
flaport committed Sep 6, 2023
1 parent 2934967 commit 09080ee
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/main.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: Build

on: [push, pull_request]
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- master
tags:
- '[0-9].[0-9].[0-9]'

jobs:
build_wheels:
Expand All @@ -17,12 +25,13 @@ jobs:
- name: Python Setup
uses: actions/setup-python@v3

- name: Install cibuildwheel
- name: Install CI Build Wheel
run: python -m pip install cibuildwheel==2.15.0

- name: Build wheels
- name: Build Wheels
run: cd eigs-py && python -m cibuildwheel --output-dir ../wheelhouse && cd -

- uses: actions/upload-artifact@v3
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
tags:
- '[0-9].[0-9].[0-9]'

jobs:
release:
name: Create Release
needs: [build_wheels]
runs-on: ubuntu-20.04

steps:
- name: Python Setup
uses: actions/setup-python@v3

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

- name: Show Dist Contents
run: ls dist

- name: Release
uses: softprops/action-gh-release@v1
with:
files: dist/*

- name: Upload to PYPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 09080ee

Please sign in to comment.