From 5792e007a31943d5cbd0671a995300ce14220524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20W=C4=85troba?= <markowanga@gmail.com> Date: Mon, 9 Aug 2021 17:13:01 +0200 Subject: [PATCH] Fix package publishing --- .github/workflows/python-master.yml | 82 ++++++++++++--- .github/workflows/python-package.yml | 146 +++++++++++++-------------- .github/workflows/python-release.yml | 33 +++--- pyproject.toml | 2 +- 4 files changed, 163 insertions(+), 100 deletions(-) diff --git a/.github/workflows/python-master.yml b/.github/workflows/python-master.yml index cf39de6..186833f 100644 --- a/.github/workflows/python-master.yml +++ b/.github/workflows/python-master.yml @@ -1,23 +1,79 @@ -name: Release pre-release version -on: release +name: CI Main +on: + push: + branches: + - main 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: - - runs-on: ubuntu-18.04 + needs: + - tests + - lint + environment: Deployment strategy: + fail-fast: false matrix: - python-version: [ '3.8' ] - + python-version: [ 3.9.6 ] + poetry-version: [ 1.1.5 ] + os: [ ubuntu-20.04 ] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + with: + fetch-depth: 0 + - uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Install run dependencies - run: | - python -m pip install --upgrade pip - pip install --upgrade -r requirements.txt - - name: Publish + - name: Install poetry + uses: abatilo/actions-poetry@v2.0.0 + with: + poetry-version: ${{ matrix.poetry-version }} + - name: Install deps + run: poetry install -vv + - name: Build and publish run: | + poetry version "$(poetry version --short)-beta.${GITHUB_RUN_NUMBER}" + poetry build + poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 5c96123..cc4b465 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -2,76 +2,76 @@ name: CI on: pull_request 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: - needs: - - tests - - lint - environment: Test deployment - 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 - with: - fetch-depth: 0 - - 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: Build and publish - run: | - poetry version "$(git describe --tags --abbrev=0)a${GITHUB_RUN_NUMBER}" - poetry build - poetry config repositories.testpypi https://test.pypi.org/legacy/ - poetry publish -r testpypi --username __token__ --password ${{ secrets.TEST_PYPI_API_TOKEN }} + 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: + needs: + - tests + - lint + environment: Test deployment + 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 + with: + fetch-depth: 0 + - 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: Build and publish + run: | + poetry version "$(poetry version --short)-alpha.${GITHUB_RUN_NUMBER}" + poetry build + poetry config repositories.clarinpypi https://pypi.clarin-pl.eu/simple/ + poetry publish -r clarinpypi --username ${{ secrets.PYPI_USER }} --password ${{ secrets.PYPI_PASS }} diff --git a/.github/workflows/python-release.yml b/.github/workflows/python-release.yml index 42a7097..7b1a2fd 100644 --- a/.github/workflows/python-release.yml +++ b/.github/workflows/python-release.yml @@ -1,24 +1,31 @@ -name: Release version +name: CI Main on: release jobs: publish: - - runs-on: ubuntu-18.04 + environment: Deployment strategy: + fail-fast: false matrix: - python-version: [ '3.8' ] - + python-version: [ 3.9.6 ] + poetry-version: [ 1.1.5 ] + os: [ ubuntu-20.04 ] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + with: + fetch-depth: 0 + - uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Install run dependencies - run: | - python -m pip install --upgrade pip - pip install --upgrade -r requirements.txt - - name: Publish + - name: Install poetry + uses: abatilo/actions-poetry@v2.0.0 + with: + poetry-version: ${{ matrix.poetry-version }} + - name: Install deps + run: poetry install -vv + - name: Build and publish run: | - + poetry version "$(git describe --tags --abbrev=0)" + poetry build + poetry publish --username __token__ --password ${{ secrets.PYPI_API_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 85a4920..bc05089 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "asr-benchmarks" -version = "0.1.0" +version = "0.1.0-alpha.11" description = "Library to benchmark ASR systems" authors = [ "Piotr Szymański <niedakh@gmail.com>", -- GitLab