Skip to content
Snippets Groups Projects
Unverified Commit 5792e007 authored by Marcin Wątroba's avatar Marcin Wątroba
Browse files

Fix package publishing

parent be92be7e
No related branches found
No related tags found
1 merge request!4Feature/add poetry
name: Release pre-release version name: CI Main
on: release on:
push:
branches:
- main
jobs: jobs:
tests:
strategy:
fail-fast: false
matrix:
python-version: [ 3.9.6 ]
poetry-version: [ 1.1.5 ]
os: [ ubuntu-20.04, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install deps
run: poetry install -vv
- name: Run tests
run: poetry run poe test
lint:
strategy:
fail-fast: false
matrix:
python-version: [ 3.9.6 ]
poetry-version: [ 1.1.5 ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install deps
run: poetry install -vv
- name: Check
run: poetry run poe check
publish: publish:
needs:
runs-on: ubuntu-18.04 - tests
- lint
environment: Deployment
strategy: strategy:
fail-fast: false
matrix: matrix:
python-version: [ '3.8' ] python-version: [ 3.9.6 ]
poetry-version: [ 1.1.5 ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} with:
uses: actions/setup-python@v2 fetch-depth: 0
- uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install run dependencies - name: Install poetry
run: | uses: abatilo/actions-poetry@v2.0.0
python -m pip install --upgrade pip with:
pip install --upgrade -r requirements.txt poetry-version: ${{ matrix.poetry-version }}
- name: Publish - name: Install deps
run: poetry install -vv
- name: Build and publish
run: | run: |
poetry version "$(poetry version --short)-beta.${GITHUB_RUN_NUMBER}"
poetry build
poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
...@@ -71,7 +71,7 @@ jobs: ...@@ -71,7 +71,7 @@ jobs:
run: poetry install -vv run: poetry install -vv
- name: Build and publish - name: Build and publish
run: | run: |
poetry version "$(git describe --tags --abbrev=0)a${GITHUB_RUN_NUMBER}" poetry version "$(poetry version --short)-alpha.${GITHUB_RUN_NUMBER}"
poetry build poetry build
poetry config repositories.testpypi https://test.pypi.org/legacy/ poetry config repositories.clarinpypi https://pypi.clarin-pl.eu/simple/
poetry publish -r testpypi --username __token__ --password ${{ secrets.TEST_PYPI_API_TOKEN }} poetry publish -r clarinpypi --username ${{ secrets.PYPI_USER }} --password ${{ secrets.PYPI_PASS }}
name: Release version name: CI Main
on: release on: release
jobs: jobs:
publish: publish:
environment: Deployment
runs-on: ubuntu-18.04
strategy: strategy:
fail-fast: false
matrix: matrix:
python-version: [ '3.8' ] python-version: [ 3.9.6 ]
poetry-version: [ 1.1.5 ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} with:
uses: actions/setup-python@v2 fetch-depth: 0
- uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install run dependencies - name: Install poetry
run: | uses: abatilo/actions-poetry@v2.0.0
python -m pip install --upgrade pip with:
pip install --upgrade -r requirements.txt poetry-version: ${{ matrix.poetry-version }}
- name: Publish - name: Install deps
run: poetry install -vv
- name: Build and publish
run: | run: |
poetry version "$(git describe --tags --abbrev=0)"
poetry build
poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}
[tool.poetry] [tool.poetry]
name = "asr-benchmarks" name = "asr-benchmarks"
version = "0.1.0" version = "0.1.0-alpha.11"
description = "Library to benchmark ASR systems" description = "Library to benchmark ASR systems"
authors = [ authors = [
"Piotr Szymański <niedakh@gmail.com>", "Piotr Szymański <niedakh@gmail.com>",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment