mirror of
https://github.com/yeslayla/cognito-oauthtools.git
synced 2025-09-14 00:43:40 +02:00
Push additional files
Update Workflow Update Workflow Update Workflow Update Workflow Update Workflow
This commit is contained in:
34
.github/workflows/build.yml
vendored
Normal file
34
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: Build & Publish
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- created
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Update Version
|
||||
run: |
|
||||
pip install bumpversion
|
||||
export regex="([0-9]+.[0-9]+.[0-9]+)"
|
||||
echo ${{ github.ref }} > tag.txt
|
||||
VERSION=`grep -Po "${regex}" tag.txt`
|
||||
bumpversion minor --no-tag --new-version ${VERSION}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
- name: build
|
||||
run: |
|
||||
python setup.py sdist bdist_wheel
|
||||
- name: PyPi Publish
|
||||
uses: pypa/gh-action-pypi-publish@v1.0.0a0
|
||||
with:
|
||||
user: josephbmanley
|
||||
password: ${{ secrets.PYPI_PASSWORD }}
|
40
.github/workflows/version.yml
vendored
Normal file
40
.github/workflows/version.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: Version & Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
CheckVersion:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: rightbrainnetworks/auto-semver
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
- name: Run auto-semver
|
||||
id: semver
|
||||
run: |
|
||||
export regex='^\\s*current_version\\s*=\\s*\\K[^\\s]+'
|
||||
export RETURN_STATUS=`semver -n`
|
||||
echo "Semver Return Status: ${RETURN_STATUS}"
|
||||
|
||||
export SEMVER_NEW_VERSION=`grep -Po '${regex}' .bumpversion.cfg`
|
||||
export VERSION=`semver_get_version -d`
|
||||
|
||||
echo ::set-output name=RETURN_STATUS::$RETURN_STATUS
|
||||
echo ::set-output name=SEMVER_NEW_VERSION::$SEMVER_NEW_VERSION
|
||||
echo ::set-output name=VERSION::$VERSION
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
if: steps['semver']['outputs']['RETURN_STATUS'] == '0'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ steps.semver.outputs.SEMVER_NEW_VERSION }}
|
||||
release_name: ${{ steps.semver.outputs.SEMVER_NEW_VERSION }}
|
||||
body: Release Version ${{ steps.semver.outputs.SEMVER_NEW_VERSION }}
|
||||
draft: false
|
||||
prerelease: false
|
Reference in New Issue
Block a user