Skip to content

Commit

Permalink
feat:semver (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored Sep 11, 2024
1 parent 383b038 commit 2172b8d
Show file tree
Hide file tree
Showing 14 changed files with 153 additions and 369 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/conventional-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# auto add labels to PRs
on:
pull_request_target:
types: [ opened, edited ]
name: conventional-release-labels
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: bcoe/conventional-release-labels@v1
77 changes: 0 additions & 77 deletions .github/workflows/publish_build.yml

This file was deleted.

77 changes: 0 additions & 77 deletions .github/workflows/publish_major.yml

This file was deleted.

77 changes: 0 additions & 77 deletions .github/workflows/publish_minor.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# This workflow will generate a distribution and upload it to PyPI

name: Publish Alpha Build ...aX
name: Stable Release
on:
push:
branches:
- dev
paths-ignore:
- 'ovos_stt_plugin_server/version.py'
- '.github/**'
- '.gitignore'
- 'LICENSE'
- 'CHANGELOG.md'
- 'MANIFEST.in'
- 'README.md'
- 'scripts/**'
branches: [master]
workflow_dispatch:

jobs:
build_and_publish:
publish_stable:
uses: TigreGotico/gh-automations/.github/workflows/publish-stable.yml@master
secrets: inherit
with:
branch: 'master'
version_file: 'ovos_phal_plugin_ipgeo/version.py'
setup_py: 'setup.py'
publish_release: true

publish_pypi:
needs: publish_stable
if: success() # Ensure this job only runs if the previous job succeeds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -31,20 +30,6 @@ jobs:
- name: Install Build Tools
run: |
python -m pip install build wheel
- name: Increment Version
run: |
VER=$(python setup.py --version)
python scripts/bump_alpha.py
- name: "Generate release changelog"
uses: heinrichreimer/github-changelog-generator-action@v2.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: changelog
- name: Commit to dev
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Increment Version
branch: dev
- name: version
run: echo "::set-output name=version::$(python setup.py --version)"
id: version
Expand All @@ -64,8 +49,24 @@ jobs:
commitish: dev
- name: Build Distribution Packages
run: |
python setup.py bdist_wheel
python setup.py sdist bdist_wheel
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{secrets.PYPI_TOKEN}}


sync_dev:
needs: publish_stable
if: success() # Ensure this job only runs if the previous job succeeds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
ref: master
- name: Push master -> dev
uses: ad-m/github-push-action@master
with:
password: ${{secrets.PYPI_TOKEN}}
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: dev
Loading

0 comments on commit 2172b8d

Please sign in to comment.