-
Notifications
You must be signed in to change notification settings - Fork 10
70 lines (67 loc) · 1.86 KB
/
release.yml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Release
on:
release:
types: [created]
jobs:
release-core:
runs-on: ubuntu-latest
defaults:
run:
working-directory: scaleway-core
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install poetry
run: |
pip install poetry
poetry --version
- name: Update lock file
run: poetry lock
- name: Install dependencies and library
run: poetry install
- name: Set package version
run: poetry version $(echo "${{ github.ref }}" | cut -d "/" -f 3)
- name: Build package
run: poetry build
- name: Publish package
run: poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
release:
runs-on: ubuntu-latest
strategy:
matrix:
lib:
- scaleway
- scaleway-async
defaults:
run:
working-directory: ${{ matrix.lib }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install poetry
run: |
pip install poetry
poetry --version
- name: Set scaleway-core version in the package
run: poetry add scaleway-core@$(echo "${{ github.ref }}" | cut -d "/" -f 3)
if: matrix.lib != 'scaleway-core'
- name: Update lock file
run: poetry lock
- name: Install dependencies and library
run: poetry install
- name: Set package version
run: poetry version $(echo "${{ github.ref }}" | cut -d "/" -f 3)
- name: Build package
run: poetry build
- name: Publish package
run: poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}