Skip to content

Release version 1.0.3 #5

Release version 1.0.3

Release version 1.0.3 #5

Workflow file for this run

name: Release
on:
pull_request:
types:
- closed
branches:
- devel
jobs:
release:
if: ${{ github.event.pull_request.merged == true && contains(github.head_ref, 'release') }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- name: Checkout latest version
uses: actions/checkout@v3
with:
ref: devel
- name: Setup Python, Ubuntu and Python environment
uses: ./.github/workflows/actions/setup
with:
python-version: ${{ matrix.python-version }}
- name: Install logki (to assure it is correctly installed) and try obtaining the version
run: |
make install
logki --version
- name: Set version
id: manual-tagger
run: echo "NEW_TAG=$(logki --version | cut -d' ' -f2)" >> "$GITHUB_OUTPUT"
- name: Tag the new version
uses: rickstaa/action-create-tag@v1.7.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.manual-tagger.outputs.NEW_TAG }}
build-and-deploy-to-pypi:
needs: release
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- name: Checkout latest version
uses: actions/checkout@v3
with:
ref: devel
- name: Setup Python, Ubuntu and Python environment
uses: ./.github/workflows/actions/setup
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Ensure that dependencies are installed
run: |
# Install and upgrade pip
python3 -m pip install --upgrade pip
# Install dependencies for build and deploy
python3 -m pip install build wheel twine
- name: Build python release distribution package
run: |
make release
- name: Upload to TestPypi
run: |
python3 -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TESTPYPI_SECRET_TOKEN }}
TWINE_REPOSITORY: testpypi
- name: Upload to Pypi
run: |
python3 -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_SECRET_TOKEN }}