This repository was archived by the owner on Apr 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (64 loc) · 2.18 KB
/
publish-package.yml
File metadata and controls
67 lines (64 loc) · 2.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Publish Frinx Services API
on:
push:
branches:
- main
jobs:
changes:
runs-on: ubuntu-latest
timeout-minutes: 60
outputs:
python-api-packages: ${{ steps.python.outputs.changes }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: python
with:
filters: |
frinx-inventory-server/python:
- 'frinx-inventory-server/python/RELEASE.md'
resource-manager/python:
- 'resource-manager/python/RELEASE.md'
performance-monitor/python:
- 'performance-monitor/python/RELEASE.md'
schellar/python:
- 'schellar/python/RELEASE.md'
topology-discovery/python:
- 'topology-discovery/python/RELEASE.md'
uniconfig/python:
- 'uniconfig/python/RELEASE.md'
blueprints-provider/python:
- 'blueprints-provider/python/RELEASE.md'
build-n-publish-pypi:
needs: changes
if: ${{ needs.changes.outputs.python-api-packages != '[]' && needs.changes.outputs.python-api-packages != '' }}
strategy:
fail-fast: true
matrix:
package: ${{ fromJSON(needs.changes.outputs.python-api-packages) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: abatilo/actions-poetry@v2
with:
poetry-version: "2.0.1"
- name: generate release tag
run: |
cd ${{ matrix.package }}
echo "PACKAGE_TAG=$(poetry version | sed 's| |_v|g')" >> "$GITHUB_ENV"
echo "DOCKER_TAG=$(cat RELEASE.md | grep "$(poetry version --short)" | cut -d '|' -f 2)" >> "$GITHUB_ENV"
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.PACKAGE_TAG }}
release_name: Release ${{ env.PACKAGE_TAG }}
body: |
- Release of ${{ env.PACKAGE_TAG }} for image with tag ${{ env.DOCKER_TAG }}
draft: false
prerelease: false