Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into main
  • Loading branch information
AyrtonB committed Mar 27, 2021
2 parents 1d1377d + a0f9a6b commit 0944874
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/tagged-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "tagged-release"

on:
push:
tags:
- "v*"

jobs:
tagged-release:
name: "Auto-Release"
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@master

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

- name: Install the module
shell: bash
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -e .
- name: Get tag version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Set PyPi version as tag
run: python -m moepy.cicd set-current-package-version ${{ steps.get_version.outputs.VERSION }}

- name: Create latest distribution
run: |
pip install -e . # reinstalling with new version number
python setup.py sdist bdist_wheel
- name: Publish package to PyPi
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Update release on GitHub
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
LICENSE.txt

0 comments on commit 0944874

Please sign in to comment.