Skip to content

Commit

Permalink
add release workflow (#156)
Browse files Browse the repository at this point in the history
* add release workflow

* remove merge request trigger
  • Loading branch information
nikita-b authored Apr 22, 2024
1 parent 2aca1a4 commit 816100e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ on:
branches: [ master ]
registry_package:
types: [published]
release:
types: [created, published, released]
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -62,15 +60,4 @@ jobs:
run: |
./run_tests.sh
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
- name: Create Package
shell: bash
run: |
python -m pip install build
python -m build --sdist --wheel
- name: Publish/Release Package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
uses: codecov/codecov-action@v3
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish

on:
release:
types:
- created

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Dependencies
shell: bash
run: pip install build
- name: Create Package
shell: bash
run: python -m build --sdist --wheel
- name: Publish/Release Package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 816100e

Please sign in to comment.