Skip to content

boosted version for publishing #4

boosted version for publishing

boosted version for publishing #4

Workflow file for this run

name: Release package
on:
workflow_dispatch:
push:
tags:
- "*.*.*"
jobs:
package-release:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Check tag syntax and set environmental variable
id: check-tag
run: |
if [[ ${{ github.ref }} =~ ^refs/tags/t[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Tag syntax is for testing"
echo "::set-output name=test_tag::true"
else
echo "Tag syntax is for release"
echo "::set-output name=test_tag::false"
fi
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
env:
repository_name: ${{ steps.check-tag.outputs.test_tag == 'true' && 'testpypi' || '' }}
repository_url: ${{ steps.check-tag.outputs.test_tag == 'true' && 'https://test.pypi.org/legacy/' || '' }}