Skip to content

Merge pull request #82 from bloatyfloat/safedns-plugin-zope-dependencies #57

Merge pull request #82 from bloatyfloat/safedns-plugin-zope-dependencies

Merge pull request #82 from bloatyfloat/safedns-plugin-zope-dependencies #57

Workflow file for this run

name: Tag Release
on:
push:
branches: [ master, main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get previous release tag
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- name: Format previous release tag
id: tagformat
run: |
previous_tag=$(echo ${{steps.previoustag.outputs.tag}} | cut -c2-)
echo "::set-output name=previous_tag::$previous_tag"
- name: Bump release version
id: bump_version
uses: christian-draeger/[email protected]
with:
current-version: ${{ steps.tagformat.outputs.previous_tag }}
version-fragment: 'bug'
- name: Create Release
if: github.event_name == 'push'
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.bump_version.outputs.next-version }}
release_name: Release v${{ steps.bump_version.outputs.next-version }}
draft: false
prerelease: false
- name: Build and deploy
if: github.event_name == 'push'
run: |
echo v${{ steps.bump_version.outputs.next-version }} > VERSION
pip install twine
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}