Skip to content

Commit

Permalink
Merge pull request #21 from cloudmitigator/semantic_versioning
Browse files Browse the repository at this point in the history
Update pipeline.yaml
  • Loading branch information
mcbanderson committed Mar 27, 2020
2 parents 5143f72 + 7a56a6a commit 30adfc0
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,38 @@ jobs:
--data '{"event_type": "deploy"}'
env:
GITHUB_PAT: ${{ secrets.GITHUB_PAT }}

release:
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: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine pyaml cloudmitigator-semantic
- name: See if Version Changed
run: |
CHANGED=$(semantic changed)
if [ "${CHANGED}" == "True" ]
then
echo ::set-env name=VERSION_CHANGED::${CHANGED}
echo ::set-env name=VERSION::$(semantic version)
echo ::set-env name=EGG::$(ls dist)
echo ::set-env name=RELEASE_BODY::$(semantic release-body)
fi
- name: Create Release
if: env.VERSION_CHANGED
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
body: ${{ env.RELEASE_BODY }}
draft: false
prerelease: false

0 comments on commit 30adfc0

Please sign in to comment.