Skip to content

Commit

Permalink
build: update CI release script (#56)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Ivelin Ivanov and semantic-release-bot authored Sep 24, 2021
1 parent 625465d commit e9cd36a
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 27 deletions.
66 changes: 43 additions & 23 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Python package
name: Python package - build, test and release

on: [push, pull_request]

jobs:
build:
name: Build Job

runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Install aiortc native dependencies
run: |
sudo apt-get update
Expand All @@ -38,34 +38,54 @@ jobs:
pip install pytest
pytest
release:
name: Release Job
release-test:
name: Release Test Job
needs: [build]
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Node.js 12
uses: actions/setup-node@v1
- uses: actions/checkout@v2
- name: Install Python 3
uses: actions/setup-python@v2
with:
node-version: 12.x
python-version: '3.x'
- name: Run Semantic Release
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
@semantic-release/exec
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
dry_run: true
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
- name: Semantic release completed
run: echo Semantic release flow completed

release-prod:
name: Release to Official Repo
needs: [release-test]
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Python 3
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Semantic Release Tool
run: |
npm install --save-dev semantic-release
npm install --save-dev @semantic-release/commit-analyzer
npm install --save-dev @semantic-release/git
npm install --save-dev @semantic-release/release-notes-generator
npm install --save-dev @semantic-release/github
npm install --save-dev @semantic-release/changelog
npm install --save-dev @semantic-release/exec
- name: Run Semantic Release
run: npx semantic-release
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
@semantic-release/exec
@semantic-release/commit-analyzer
@semantic-release/release-notes-generator
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
- name: Semantic release completed
run: echo Semantic release flow completed


33 changes: 30 additions & 3 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,39 @@ on:
types: [created]

jobs:
deploy:

publish-test:
name: Test package publishing on test.pypi.org
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: '__token__'
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: |
cp README.md src/
cd src
python setup.py sdist bdist_wheel
twine upload --verbose --repository testpypi dist/*
publish-prod:
name: Publish official package on PyPi.org
needs: [publish-test]
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository_owner == 'ambianic'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Semantic Versioning Changelog

## [1.4.2](https://github.com/ivelin/peerjs-python/compare/v1.4.1...v1.4.2) (2021-09-21)


### Bug Fixes

* test new script ([5090913](https://github.com/ivelin/peerjs-python/commit/5090913293a22897b850945215520a78fc5fbead))

## [1.4.1](https://github.com/ivelin/peerjs-python/compare/v1.4.0...v1.4.1) (2021-09-21)


### Bug Fixes

* 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)
* allow more lenient peers id load ([981ae27](https://github.com/ivelin/peerjs-python/commit/981ae27bd980cb43ddef1906e9f17a7756314696))
* 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)
* load peer ID from an empty file ([b9ff9fa](https://github.com/ivelin/peerjs-python/commit/b9ff9faa578eed3a53a2350b7f694fff6dc06fd7))
* 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)
* log_level not found in config ([ddfedea](https://github.com/ivelin/peerjs-python/commit/ddfedeac4ee4803fdee79f209f90798842312118))
* merge pull request [#38](https://github.com/ivelin/peerjs-python/issues/38) from ivelin/master ([12a4365](https://github.com/ivelin/peerjs-python/commit/12a43657fe828b3ed986ca8c8aae82f85a79ffb5))
* peer reconnect error; closes [#31](https://github.com/ivelin/peerjs-python/issues/31) ([6b68cfa](https://github.com/ivelin/peerjs-python/commit/6b68cfa9145422488cf35f161e9e40ea88ae73ee))
* 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)

## [1.4.5](https://github.com/ambianic/peerjs-python/compare/v1.4.4...v1.4.5) (2021-01-23)


Expand Down
2 changes: 1 addition & 1 deletion src/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = peerjs
version = 1.4.5
version = 1.4.2
author = Ivelin Ivanov
author_email = ivelin.ivanov@ambianic.ai
description = Python port of PeerJS client library.
Expand Down

0 comments on commit e9cd36a

Please sign in to comment.