Skip to content

Commit e9cd36a

Browse files
Ivelin Ivanovsemantic-release-bot
andauthored
build: update CI release script (#56)
* build: update deps versions * build: test sem rel action * build: update access tokens * build: sem rel fix * build: sem rel * build: test new script Signed-off-by: ivelin <ivelin@ambianic.ai> * chore(release): 1.4.1 [skip ci] ## [1.4.1](ivelin/peerjs-python@v1.4.0...v1.4.1) (2021-09-21) ### Bug Fixes * allow more lenient peers id load ([1fe71b6](ivelin@1fe71b6)), closes [#51](https://github.com/ivelin/peerjs-python/issues/51) * allow more lenient peers id load ([981ae27](ivelin@981ae27)) * load peer ID from an empty file ([4cfe6fb](ivelin@4cfe6fb)), closes [#52](https://github.com/ivelin/peerjs-python/issues/52) * load peer ID from an empty file ([b9ff9fa](ivelin@b9ff9fa)) * log_level not found in config ([fb0a2da](ivelin@fb0a2da)), closes [#53](https://github.com/ivelin/peerjs-python/issues/53) * log_level not found in config ([ddfedea](ivelin@ddfedea)) * merge pull request [#38](https://github.com/ivelin/peerjs-python/issues/38) from ivelin/master ([12a4365](ivelin@12a4365)) * peer reconnect error; closes [#31](https://github.com/ivelin/peerjs-python/issues/31) ([6b68cfa](ivelin@6b68cfa)) * rename http-proxy to http_proxy ([8ee5e0b](ivelin@8ee5e0b)), closes [#50](https://github.com/ivelin/peerjs-python/issues/50) * build: test new script Signed-off-by: ivelin <ivelin@ambianic.ai> * build: test new script Signed-off-by: ivelin <ivelin@ambianic.ai> * fix: test new script Signed-off-by: ivelin <ivelin@ambianic.ai> * chore(release): 1.4.2 [skip ci] ## [1.4.2](ivelin/peerjs-python@v1.4.1...v1.4.2) (2021-09-21) ### Bug Fixes * test new script ([5090913](ivelin@5090913)) Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
1 parent 625465d commit e9cd36a

4 files changed

Lines changed: 96 additions & 27 deletions

File tree

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

33
on: [push, pull_request]
44

55
jobs:
66
build:
77
name: Build Job
88

9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-latest
1010
strategy:
1111
max-parallel: 4
1212
matrix:
1313
python-version: [3.7, 3.8, 3.9]
1414

1515
steps:
16-
- uses: actions/checkout@v1
16+
- uses: actions/checkout@v2
1717
- name: Install aiortc native dependencies
1818
run: |
1919
sudo apt-get update
@@ -38,34 +38,54 @@ 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]
44-
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
4544
runs-on: ubuntu-latest
4645
steps:
47-
- uses: actions/checkout@v1
48-
- name: Install Node.js 12
49-
uses: actions/setup-node@v1
46+
- uses: actions/checkout@v2
47+
- name: Install Python 3
48+
uses: actions/setup-python@v2
5049
with:
51-
node-version: 12.x
50+
python-version: '3.x'
51+
- name: Run Semantic Release
52+
uses: cycjimmy/semantic-release-action@v2
53+
with:
54+
extra_plugins: |
55+
@semantic-release/changelog
56+
@semantic-release/git
57+
@semantic-release/exec
58+
@semantic-release/commit-analyzer
59+
@semantic-release/release-notes-generator
60+
dry_run: true
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
63+
- name: Semantic release completed
64+
run: echo Semantic release flow completed
65+
66+
release-prod:
67+
name: Release to Official Repo
68+
needs: [release-test]
69+
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: actions/checkout@v2
5273
- name: Install Python 3
53-
uses: actions/setup-python@v1
74+
uses: actions/setup-python@v2
5475
with:
5576
python-version: '3.x'
56-
- name: Install Semantic Release Tool
57-
run: |
58-
npm install --save-dev semantic-release
59-
npm install --save-dev @semantic-release/commit-analyzer
60-
npm install --save-dev @semantic-release/git
61-
npm install --save-dev @semantic-release/release-notes-generator
62-
npm install --save-dev @semantic-release/github
63-
npm install --save-dev @semantic-release/changelog
64-
npm install --save-dev @semantic-release/exec
6577
- name: Run Semantic Release
66-
run: npx semantic-release
78+
uses: cycjimmy/semantic-release-action@v2
79+
with:
80+
extra_plugins: |
81+
@semantic-release/changelog
82+
@semantic-release/git
83+
@semantic-release/exec
84+
@semantic-release/commit-analyzer
85+
@semantic-release/release-notes-generator
6786
env:
68-
GITHUB_TOKEN: ${{ secrets.GITHUB_PAT }}
69-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
87+
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
7088
- name: Semantic release completed
7189
run: echo Semantic release flow completed
90+
91+

.github/workflows/pythonpublish.yml

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,39 @@ on:
55
types: [created]
66

77
jobs:
8-
deploy:
8+
9+
publish-test:
10+
name: Test package publishing on test.pypi.org
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.x'
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install setuptools wheel twine
22+
- name: Build and publish
23+
env:
24+
TWINE_USERNAME: '__token__'
25+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
26+
run: |
27+
cp README.md src/
28+
cd src
29+
python setup.py sdist bdist_wheel
30+
twine upload --verbose --repository testpypi dist/*
31+
32+
publish-prod:
33+
name: Publish official package on PyPi.org
34+
needs: [publish-test]
35+
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository_owner == 'ambianic'
936
runs-on: ubuntu-latest
1037
steps:
11-
- uses: actions/checkout@v1
38+
- uses: actions/checkout@v2
1239
- name: Set up Python
13-
uses: actions/setup-python@v1
40+
uses: actions/setup-python@v2
1441
with:
1542
python-version: '3.x'
1643
- name: Install dependencies

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Semantic Versioning Changelog
22

3+
## [1.4.2](https://github.com/ivelin/peerjs-python/compare/v1.4.1...v1.4.2) (2021-09-21)
4+
5+
6+
### Bug Fixes
7+
8+
* test new script ([5090913](https://github.com/ivelin/peerjs-python/commit/5090913293a22897b850945215520a78fc5fbead))
9+
10+
## [1.4.1](https://github.com/ivelin/peerjs-python/compare/v1.4.0...v1.4.1) (2021-09-21)
11+
12+
13+
### Bug Fixes
14+
15+
* allow more lenient peers id load ([1fe71b6](https://github.com/ivelin/peerjs-python/commit/1fe71b6e5903d6068f83fb6142da64e1cd34b763)), closes [#51](https://github.com/ivelin/peerjs-python/issues/51)
16+
* allow more lenient peers id load ([981ae27](https://github.com/ivelin/peerjs-python/commit/981ae27bd980cb43ddef1906e9f17a7756314696))
17+
* load peer ID from an empty file ([4cfe6fb](https://github.com/ivelin/peerjs-python/commit/4cfe6fb36e0f48ec5b29b3d491b77840921f57d8)), closes [#52](https://github.com/ivelin/peerjs-python/issues/52)
18+
* load peer ID from an empty file ([b9ff9fa](https://github.com/ivelin/peerjs-python/commit/b9ff9faa578eed3a53a2350b7f694fff6dc06fd7))
19+
* log_level not found in config ([fb0a2da](https://github.com/ivelin/peerjs-python/commit/fb0a2da641d97ea0e2ebd376d120fbc357d5ba02)), closes [#53](https://github.com/ivelin/peerjs-python/issues/53)
20+
* log_level not found in config ([ddfedea](https://github.com/ivelin/peerjs-python/commit/ddfedeac4ee4803fdee79f209f90798842312118))
21+
* merge pull request [#38](https://github.com/ivelin/peerjs-python/issues/38) from ivelin/master ([12a4365](https://github.com/ivelin/peerjs-python/commit/12a43657fe828b3ed986ca8c8aae82f85a79ffb5))
22+
* peer reconnect error; closes [#31](https://github.com/ivelin/peerjs-python/issues/31) ([6b68cfa](https://github.com/ivelin/peerjs-python/commit/6b68cfa9145422488cf35f161e9e40ea88ae73ee))
23+
* rename http-proxy to http_proxy ([8ee5e0b](https://github.com/ivelin/peerjs-python/commit/8ee5e0b1d46e10549308c6e131a2d38704a18465)), closes [#50](https://github.com/ivelin/peerjs-python/issues/50)
24+
325
## [1.4.5](https://github.com/ambianic/peerjs-python/compare/v1.4.4...v1.4.5) (2021-01-23)
426

527

src/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = peerjs
3-
version = 1.4.5
3+
version = 1.4.2
44
author = Ivelin Ivanov
55
author_email = ivelin.ivanov@ambianic.ai
66
description = Python port of PeerJS client library.

0 commit comments

Comments
 (0)