Skip to content

Commit a99af0c

Browse files
author
Ivelin Ivanov
authored
build: sem rel
1 parent 2e18524 commit a99af0c

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Python package
1+
name: Python package - build, test and release
22

33
on: [push, pull_request]
44

@@ -38,8 +38,8 @@ jobs:
3838
pip install pytest
3939
pytest
4040
41-
release:
42-
name: Release Job
41+
release-test:
42+
name: Release Test Job
4343
needs: [build]
4444
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
4545
runs-on: ubuntu-latest
@@ -63,3 +63,30 @@ jobs:
6363
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
6464
- name: Semantic release completed
6565
run: echo Semantic release flow completed
66+
67+
release-prod:
68+
name: Release to Official Repo
69+
needs: [release-test]
70+
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository_owner == 'ambianic'
71+
runs-on: ubuntu-latest
72+
steps:
73+
- uses: actions/checkout@v2
74+
- name: Install Python 3
75+
uses: actions/setup-python@v2
76+
with:
77+
python-version: '3.x'
78+
- name: Run Semantic Release
79+
uses: cycjimmy/semantic-release-action@v2
80+
with:
81+
extra_plugins: |
82+
@semantic-release/changelog
83+
@semantic-release/git
84+
@semantic-release/exec
85+
@semantic-release/commit-analyzer
86+
@semantic-release/release-notes-generator
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
89+
- name: Semantic release completed
90+
run: echo Semantic release flow completed
91+
92+

0 commit comments

Comments
 (0)