Skip to content

Commit

Permalink
Merge pull request #5 from aplura/next
Browse files Browse the repository at this point in the history
Fri Jun  7 11:51:02 EDT 2024 GitHubAction for Release
  • Loading branch information
alacercogitatus authored Jun 7, 2024
2 parents aff8e0f + ad879e6 commit 949ef68
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
36 changes: 23 additions & 13 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,30 @@ jobs:
script: '.version'
# Output raw strings, not JSON texts
raw-output: true
- name: Create Tag
uses: actions/github-script@v3
env:
TAG: ${{ steps.version.outputs.output }}
- name: 'Get Release Notes'
id: releaseNotes
uses: 'cloudposse/github-action-jq@main'
with:
github-token: ${{ github.token }}
script: |
github.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/${{ steps.set-tag.outputs.tag_name }}",
sha: context.sha
})
input: 'release_notes.json'
# JQ query string
script: '.| to_entries[] | select(.key | startswith("${{ steps.version.outputs.output }}")) | .value'
# Output raw strings, not JSON texts
raw-output: true
- name: Tag the commit
run: |
next_version=${{ steps.version.outputs.output }}
git tag -a "$next_version" -m "Version $next_version"
git push --follow-tags
- name: Build Package SDist
run: python -m build --sdist
- name: Build Package Wheel
run: python -m build --wheel
run: python -m build --wheel
- name: Create release
id: create_release
uses: actions/create-release@latest
with:
tag_name: ${{ steps.version.outputs.output }}
release_name: Release ${{ steps.version.outputs.output }}
body: ${{ steps.releaseNotes.outputs.output }}
draft: false
prerelease: false
6 changes: 3 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package
name: Python Testing

on:
push:
Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
# stop the build if there are Python syntax errors or undefined names
flake8 ./geese --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ./geese --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
flake8 ./geese --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --ignore=E1,E23,W503
- name: Test with pytest
run: |
pytest tests/tests.py --doctest-modules --junitxml=junit/test-results.xml
pytest tests/tests.py --doctest-modules --junitxml=tests/results/junit-test-results.xml
2 changes: 1 addition & 1 deletion geese/knowledge/certificates.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class Certificates(BaseKnowledge):
def __init__(self, leader, args=None, logger=None, group=None, fleet=None, **kwargs):
def __init__(self, leader, args=None, logger=None, group=None, fleet=None, **kwargs):
super().__init__(leader, args, logger, **kwargs)
self.obj_type = "certificates"
self.endpoint = "system/certificates"
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"build": "yarn wheel && yarn sdist",
"wheel": "python3 -m build --wheel",
"sdist": "python3 -m build --sdist",
"pip": "python -m pip install --upgrade -r ./requirements.txt"
"pip": "python -m pip install --upgrade -r ./requirements.txt",
"test": "pytest tests/tests.py --doctest-modules --junitxml=tests/results/junit-test-results.xml",
"flake": "flake8 ./geese --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --ignore=C901,E501,E722"
}
}
3 changes: 3 additions & 0 deletions release_notes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"1.1.2": "Initial Release to Public"
}

0 comments on commit 949ef68

Please sign in to comment.