Skip to content

Commit

Permalink
added gh-actions for release
Browse files Browse the repository at this point in the history
  • Loading branch information
dhhagan committed Feb 20, 2022
1 parent 972d6ac commit 6120995
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: '🧰 Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes
$CHANGES
3 changes: 0 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: docs/gh-pages
on: workflow_dispatch
# create:
# tags:
# - v*

jobs:
build-docs:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release Drafter

on:
push:
# - master
pull_request:
types: [opened, reopened, synchronize]

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: build & release
on:
release:
types: [published]

jobs:
build-n-publish:
name: Build and publish to PyPI
runs-on: ubuntu-18.04
steps:
- name: Checkout branch
uses: actions/checkout@v2

- name: Setup python
uses: actions/setup-python@master
with:
python-version: 3.8

- name: Install poetry
uses: snok/[email protected]
with:
version: 1.1.4
create_virtualenvs: true

- name: Install dependencies
run: poetry install

- name: Build and publish to PyPI
run: |
poetry build
poetry publish -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }}

0 comments on commit 6120995

Please sign in to comment.