-
Notifications
You must be signed in to change notification settings - Fork 40
64 lines (59 loc) · 1.85 KB
/
package-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
name: Package Release
on:
push:
branches:
- master
- main
- dev
permissions:
contents: write
jobs:
package-filter:
name: Filter for updated package
if: github.repository == 'polusai/polus-plugins'
uses: ./.github/workflows/package-filter.yml
package-release:
name: Release "${{ matrix.package_name }}"
if: github.repository == 'polusai/polus-plugins'
needs: package-filter
strategy:
matrix: ${{fromJson(needs.package-filter.outputs.matrix)}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install bump2version
run: |
python -m pip install --upgrade pip
pip install bump2version
- name: Bump Version
run: |
cd "${{ matrix.package_dir }}"
bump2version release --no-commit
- name: Commit and push all changed files
env:
CI_COMMIT_AUTHOR: Continuous Integration
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "username@users.noreply.github.com"
git commit -a -m "build: Bumped release version for ${{ matrix.package_name }}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.CI_TOKEN }}
branch: ${{ github.ref }}
docker:
name: Build Docker images
if: github.repository == 'polusai/polus-plugins'
needs: [package-filter, package-release]
uses: ./.github/workflows/docker.yml
with:
matrix: ${{ needs.package-filter.outputs.matrix }}
push: true
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }}