-
Notifications
You must be signed in to change notification settings - Fork 12
51 lines (40 loc) · 1.18 KB
/
cogstack-es_release.yml
File metadata and controls
51 lines (40 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: cogstack-es release-build
on:
push:
tags:
- 'cogstack-es/v*.*.*'
permissions:
id-token: write
defaults:
run:
working-directory: ./cogstack-es
jobs:
test-and-publish-to-PyPI:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v6
- name: Release Tag
# If GITHUB_REF=refs/tags/cogstack-es/v0.1.2, this returns v0.1.2. Note it's including the "v" though it probably shouldnt
run: echo "RELEASE_VERSION=${GITHUB_REF##refs/*/}" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build
- name: Install client package in development mode
run: |
pip install -e ".[dev,ES9,OS]"
- name: Test
run: |
pytest tests
- name: Build client package
run: |
python -m build
- name: Publish production distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: cogstack-es/dist