Skip to content

Commit

Permalink
feat/packaging workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Feb 25, 2022
1 parent 57f7909 commit 7cc1a0c
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 13 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/dev2master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This workflow will generate a distribution and upload it to PyPI

name: Push dev -> master
on:
workflow_dispatch:

jobs:
build_and_publish:
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: dev
- name: Push dev -> master
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
15 changes: 12 additions & 3 deletions .github/workflows/publish_alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
- 'examples/**'
- '.github/**'
- 'LICENSE'
- 'CHANGELOG.md'
- 'MANIFEST.in'
- 'readme.md'
- 'scripts/**'
workflow_dispatch:
Expand All @@ -22,7 +24,8 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
ref: dev
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup Python
uses: actions/setup-python@v1
with:
Expand All @@ -34,10 +37,16 @@ jobs:
run: |
VER=$(python setup.py --version)
python scripts/bump_alpha.py
- name: Push Version Change
- 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 @@ -51,7 +60,7 @@ jobs:
release_name: Release ${{ steps.version.outputs.version }}
body: |
Changes in this Release
- TODO
{{ steps.changelog.outputs.changelog }}
draft: false
prerelease: true
- name: Build Distribution Packages
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/publish_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
ref: dev
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup Python
uses: actions/setup-python@v1
with:
Expand All @@ -22,10 +23,22 @@ jobs:
run: |
VER=$(python setup.py --version)
python scripts/bump_build.py
- name: Push Version Change
- 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: Push dev -> master
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
force: true
- name: version
run: echo "::set-output name=version::$(python setup.py --version)"
id: version
Expand All @@ -39,7 +52,7 @@ jobs:
release_name: Release ${{ steps.version.outputs.version }}
body: |
Changes in this Release
- TODO
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
- name: Build Distribution Packages
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/publish_major.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
ref: dev
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup Python
uses: actions/setup-python@v1
with:
Expand All @@ -22,10 +23,22 @@ jobs:
run: |
VER=$(python setup.py --version)
python scripts/bump_major.py
- name: Push Version Change
- 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: Push dev -> master
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
force: true
- name: version
run: echo "::set-output name=version::$(python setup.py --version)"
id: version
Expand All @@ -39,7 +52,7 @@ jobs:
release_name: Release ${{ steps.version.outputs.version }}
body: |
Changes in this Release
- TODO
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
- name: Build Distribution Packages
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/publish_minor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
ref: dev
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup Python
uses: actions/setup-python@v1
with:
Expand All @@ -22,10 +23,22 @@ jobs:
run: |
VER=$(python setup.py --version)
python scripts/bump_minor.py
- name: Push Version Change
- 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: Push dev -> master
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
force: true
- name: version
run: echo "::set-output name=version::$(python setup.py --version)"
id: version
Expand All @@ -39,7 +52,7 @@ jobs:
release_name: Release ${{ steps.version.outputs.version }}
body: |
Changes in this Release
- TODO
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
- name: Build Distribution Packages
Expand Down
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
recursive-include ovos_utils/res *
recursive-include ovos_utils/ *
recursive-include requirements/ *
include CHANGELOG.md
include LICENSE

0 comments on commit 7cc1a0c

Please sign in to comment.