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

Update GH automation to best practices #42

Merged
merged 1 commit into from
Jun 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
3 changes: 1 addition & 2 deletions .github/workflows/license_tests.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Run License Tests
on:
push:
workflow_dispatch:

pull_request:
jobs:
license_tests:
uses: neongeckocom/.github/.github/workflows/license_tests.yml@master
27 changes: 27 additions & 0 deletions .github/workflows/propose_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Propose Stable Release
on:
workflow_dispatch:
inputs:
release_type:
type: choice
description: Release Type
options:
- patch
- minor
- major
jobs:
update_version:
uses: neongeckocom/.github/.github/workflows/propose_semver_release.yml@master
with:
branch: dev
release_type: ${{ inputs.release_type }}
update_changelog: True
pull_changes:
uses: neongeckocom/.github/.github/workflows/pull_master.yml@master
needs: update_version
with:
pr_reviewer: neonreviewers
pr_assignee: ${{ github.actor }}
pr_draft: false
pr_title: ${{ needs.update_version.outputs.version }}
pr_body: ${{ needs.update_version.outputs.changelog }}
1 change: 1 addition & 0 deletions .github/workflows/publish_test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ jobs:
secrets: inherit
with:
version_file: "version.py"
publish_prerelease: true
14 changes: 0 additions & 14 deletions .github/workflows/pull_master.yml

This file was deleted.

10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
SKILL_PKG = SKILL_NAME.replace('-', '_')
# skill_id=package_name:SkillClass
PLUGIN_ENTRY_POINT = f'{SKILL_NAME}.neongeckocom={SKILL_PKG}:LauncherSkill'
BASE_PATH = path.abspath(path.dirname(__file__))


def get_requirements(requirements_filename: str):
requirements_file = path.join(path.abspath(path.dirname(__file__)),
requirements_filename)
requirements_file = path.join(BASE_PATH, requirements_filename)
with open(requirements_file, 'r', encoding='utf-8') as r:
requirements = r.readlines()
requirements = [r.strip() for r in requirements if r.strip()
Expand All @@ -59,7 +59,7 @@ def get_requirements(requirements_filename: str):

def find_resource_files():
resource_base_dirs = ("locale", "ui", "vocab", "dialog", "regex")
base_dir = path.dirname(__file__)
base_dir = BASE_PATH
package_data = ["skill.json"]
for res in resource_base_dirs:
if path.isdir(path.join(base_dir, res)):
Expand All @@ -72,10 +72,10 @@ def find_resource_files():
return package_data


with open("README.md", "r") as f:
with open(path.join(BASE_PATH, "README.md"), "r") as f:
long_description = f.read()

with open("./version.py", "r", encoding="utf-8") as v:
with open(path.join(BASE_PATH, "version.py"), "r", encoding="utf-8") as v:
for line in v.readlines():
if line.startswith("__version__"):
if '"' in line:
Expand Down