Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat update release automation #4

Merged
merged 6 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .github/workflows/dev2master.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/propose_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Propose Stable Release
on:
workflow_dispatch:
inputs:
release_type:
type: choice
description: Release Type
options:
- build
- minor
- major
jobs:
update_version:
uses: neongeckocom/.github/.github/workflows/propose_semver_release.yml@FEAT_OvosPackageSupport
with:
release_type: ${{ inputs.release_type }}
version_file: ovos_utils/version.py
alpha_var: VERSION_ALPHA
build_var: VERSION_BUILD
minor_var: VERSION_MINOR
major_var: VERSION_MAJOR
update_changelog: True
branch: dev

pull_changes:
needs: update_version
uses: neongeckocom/.github/.github/workflows/pull_master.yml@master
with:
pr_assignee: ${{ github.actor }}
pr_draft: false
pr_title: ${{ needs.update_version.outputs.version }}
pr_body: ${{ needs.update_version.outputs.changelog }}
57 changes: 24 additions & 33 deletions .github/workflows/publish_alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,55 +19,46 @@ on:
workflow_dispatch:

jobs:
update_version:
uses: neongeckocom/.github/.github/workflows/propose_semver_release.yml@FEAT_OvosPackageSupport
with:
release_type: "alpha"
version_file: ovos_utils/version.py
alpha_var: VERSION_ALPHA
build_var: VERSION_BUILD
minor_var: VERSION_MINOR
major_var: VERSION_MAJOR
update_changelog: True
branch: dev
build_and_publish:
runs-on: ubuntu-latest
needs: update_version
steps:
- uses: actions/checkout@v2
with:
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:
python-version: 3.8
- 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/[email protected]
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
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: V${{ steps.version.outputs.version }}
release_name: Release ${{ steps.version.outputs.version }}
tag_name: V${{ needs.update_version.outputs.version }}
release_name: Release ${{ needs.update_version.outputs.version }}
body: |
Changes in this Release
${{ steps.changelog.outputs.changelog }}
${{ needs.update_version.outputs.changelog }}
draft: false
prerelease: true
commitish: dev
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: dev
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Build Distribution Packages
run: |
python setup.py sdist bdist_wheel
- name: Publish to Test PyPI
uses: pypa/gh-action-pypi-publish@master
- name: Publish to PyPI
if: False
# TODO: Remove test patch above
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{secrets.PYPI_TOKEN}}
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.

Loading