From ce1aa9ff9e2901eca78bfbf03804fbd315d8f171 Mon Sep 17 00:00:00 2001 From: evgeny-stakewise <123374581+evgeny-stakewise@users.noreply.github.com> Date: Wed, 21 Aug 2024 12:59:46 +0300 Subject: [PATCH] Check release (#114) * Add release version check * Fix * Fix 2 * Fix 3 * Fix 4 * Fix 5 * Fix 6 * Fix 7 * Fix 8 * Fix 9 * Fix 10 * Test correct version * Revert "Test correct version" This reverts commit ea8f1bfe82343e9aa384e92458d9d2ec80b3ea2e. * Swap labels --- .github/workflows/release.yaml | 36 ++++++++++++++++++++++++++++++++++ pyproject.toml | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..c165d12 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,36 @@ +name: Release + +on: + release: + types: [published] + +jobs: + checks: + name: Check version + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up python + uses: actions/setup-python@v2 + with: + python-version: 3.10.5 + + # Install poetry + - name: Load cached Poetry installation + uses: actions/cache@v2 + with: + path: ~/.local + key: poetry-0 + + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + + - name: Check project version matches tag name + run: | + [ "`poetry version --short`" == "${{ github.ref_name }}" ] diff --git a/pyproject.toml b/pyproject.toml index b4218df..5cf97a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "sw-utils" -version = "0.6.20" +version = "v0.6.20" description = "StakeWise Python utils" authors = ["StakeWise Labs "] license = "GPL-3.0-or-later"