Skip to content

Commit

Permalink
[DOP-11677] - add workflow for dev release to test.pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-lixakov committed Feb 9, 2024
1 parent d46e565 commit 674a27f
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 1 deletion.
59 changes: 59 additions & 0 deletions .github/workflows/dev-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Dev release

on:
push:
branches-ignore:
- dependabot/**
- pre-commit-ci-update-config
- master
workflow_dispatch:

env:
DEFAULT_PYTHON: '3.12'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
wait-code-analysis:
name: Release package
runs-on: ubuntu-latest
if: github.repository == 'MobileTeleSystems/horizon' # prevent running on forks

environment:
name: test-pypi
url: https://test.pypi.org/p/data-horizon
permissions:
id-token: write # to auth in Test PyPI

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5
with:
python-version: ${{ env.DEFAULT_PYTHON }}

- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Generate unique version and update test version
run: |
version=$(poetry version -s)
poetry version "${version}.dev${GITHUB_RUN_ID}"
- name: Build package
run: poetry build

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Horizon
.. |Logo| image:: docs/_static/logo.svg
:width: 400
:alt: Horizon logo
:target: https://gitlab.services.mts.ru/bigdata/platform/onetools/horizon
:target: https://github.com/MobileTeleSystems/horizon/

What is Horizon?
----------------
Expand Down

0 comments on commit 674a27f

Please sign in to comment.