Skip to content

Commit

Permalink
Merge pull request #11 from keithrozario/no_build_1
Browse files Browse the repository at this point in the history
added release workflow
  • Loading branch information
keithrozario authored Apr 7, 2020
2 parents 1ae31e9 + 9734750 commit 6681add
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 24 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Release

# Triggers
on:
release:
types: [published]

# Specify what jobs to run
jobs:
Build_Release:
name: Build_Release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6

- name: Install Poetry
uses: dschep/[email protected]

- name: Install Dependencies
run: poetry install

- name: Build
working-directory: .
run: poetry build

- name: publish
working-directory: .
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish
- name: Archive production artifacts
uses: actions/upload-artifact@v1
with:
name: dist
path: dist

# Success / Failure, publish to Slack
- name: Notify slack success
if: success()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: lambda-cache
status: SUCCESS
color: good

- name: Notify slack fail
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: lambda-cache
status: FAILED
color: danger
25 changes: 2 additions & 23 deletions .github/workflows/version_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,32 +43,11 @@ jobs:
- name: Lint with black
run: poetry run black lambda_cache --check

# Only runs on release branch
# Only runs on release branch
- name: Update Test Coverage
if: github.ref == 'refs/heads/release' # only on the feature branch do we publish code coverage stats
working-directory: ./tests
run: |
poetry run coveralls debug
poetry run coveralls
- name: Build
if: github.ref == 'refs/heads/release'
working-directory: .
run: poetry build

- name: publish
if: github.ref == 'refs/heads/release'
working-directory: .
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish
- name: Archive production artifacts
if: github.ref == 'refs/heads/release'
uses: actions/upload-artifact@v1
with:
name: dist
path: dist
run: poetry run coveralls

# Success / Failure, publish to Slack
- name: Notify slack success
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

![PackageStatus](https://img.shields.io/static/v1?label=status&message=beta&color=blueviolet?style=flat-square) ![PythonSupport](https://img.shields.io/static/v1?label=python&message=3.6%20|%203.7|%203.8&color=blue?style=flat-square&logo=python)

![Build](https://github.com/keithrozario/lambda_cache/workflows/Build/badge.svg?branch=release) [![Coverage Status](https://coveralls.io/repos/github/keithrozario/lambda_cache/badge.svg?branch=release)](https://coveralls.io/github/keithrozario/lambda_cache?branch=release) [![Documentation Status](https://readthedocs.org/projects/simple-lambda-cache/badge/?version=latest)](https://simple-lambda-cache.readthedocs.io/en/latest/?badge=latest)
![Build](https://github.com/keithrozario/lambda_cache/workflows/Build/badge.svg?branch=release) [![Coverage Status](https://coveralls.io/repos/github/keithrozario/lambda-cache/badge.svg?branch=release)](https://coveralls.io/github/keithrozario/lambda-cache?branch=release) [![Documentation Status](https://readthedocs.org/projects/simple-lambda-cache/badge/?version=latest)](https://simple-lambda-cache.readthedocs.io/en/latest/?badge=latest)

[![PyPI version](https://badge.fury.io/py/lambda-cache.svg)](https://badge.fury.io/py/lambda-cache) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Expand Down

0 comments on commit 6681add

Please sign in to comment.