Skip to content

Commit

Permalink
add GHA for release (#155)
Browse files Browse the repository at this point in the history
* add GHA for release

* adapting tags in release.yml
  • Loading branch information
jGaboardi committed Mar 29, 2022
1 parent 353073b commit 03d716f
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/release.yml
@@ -0,0 +1,17 @@
changelog:
exclude:
labels:
- ignore-for-release
authors:
- octocat
- dependabot
categories:
- title: Breaking Changes 🛠
labels:
- breaking-change
- title: Exciting New Features 🎉
labels:
- enhancement
- title: Other Changes
labels:
- "*"
49 changes: 49 additions & 0 deletions .github/workflows/release_and_publish.yml
@@ -0,0 +1,49 @@
name: Release & Publish

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
workflow_dispatch:
inputs:
version:
description: Manual Release
default: test
required: false


jobs:
build:
name: Create release & publish to PyPI
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Set up python
uses: actions/setup-python@v3
with:
python-version: "3.x"

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine jupyter urllib3 pandas pyyaml
python setup.py sdist bdist_wheel
- name: Create Release Notes
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
await github.request(`POST /repos/${{ github.repository }}/releases`, {
tag_name: "${{ github.ref }}",
generate_release_notes: true
});
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}

0 comments on commit 03d716f

Please sign in to comment.