From 24cd9db4f11b41e79d240a00c3388d1338148cae Mon Sep 17 00:00:00 2001 From: seph Date: Tue, 23 Jul 2024 23:10:36 -0400 Subject: [PATCH 1/6] Automate build and release --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 383d5dd..178e1dd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: pip install setuptools wheel - name: build run: | - python -m build + python setup.py build - name: package run: | python setup.py sdist bdist_wheel From bdca67bb1bd738f46cbc1d92af762ff54bb30b72 Mon Sep 17 00:00:00 2001 From: seph Date: Tue, 23 Jul 2024 23:14:14 -0400 Subject: [PATCH 2/6] deprecation --- .github/workflows/release.yml | 8 ++++---- setup.cfg | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 178e1dd..da91b2f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,8 +12,8 @@ jobs: fail-fast: false matrix: os: - - ubuntu-20.04 - - macos-12 + - ubuntu-24.04 + - macos-latest - windows-latest steps: - uses: actions/checkout@v4 @@ -24,10 +24,10 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel + pip install setuptools wheel build - name: build run: | python setup.py build - name: package run: | - python setup.py sdist bdist_wheel + python -m build diff --git a/setup.cfg b/setup.cfg index 87cb642..94f4887 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [metadata] -description-file = README.rst +description_file = README.rst [bdist_wheel] universal=1 From c598c740d96f844cd1648b18e7e0547c8031f472 Mon Sep 17 00:00:00 2001 From: seph Date: Tue, 23 Jul 2024 23:20:40 -0400 Subject: [PATCH 3/6] test --- .github/workflows/release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da91b2f..b7ef719 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,3 +31,12 @@ jobs: - name: package run: | python -m build + publish: + needs: build_and_test + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/osquery + steps: + - name: hi + run: "ls" From d130d118569e94316bb89bcb142fc60d8d344a05 Mon Sep 17 00:00:00 2001 From: seph Date: Tue, 23 Jul 2024 23:24:10 -0400 Subject: [PATCH 4/6] maybe --- .github/workflows/release.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7ef719..f733832 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,6 +37,23 @@ jobs: environment: name: pypi url: https://pypi.org/p/osquery + permissions: + id-token: write steps: - - name: hi - run: "ls" + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel build + - name: build + run: | + python setup.py build + - name: package + run: | + python -m build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 From e20d80b2d57149c8b1f797a0f48e0f88fa35b1f4 Mon Sep 17 00:00:00 2001 From: seph Date: Tue, 23 Jul 2024 23:28:40 -0400 Subject: [PATCH 5/6] version --- osquery/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osquery/__init__.py b/osquery/__init__.py index fa9ec76..01c5a06 100644 --- a/osquery/__init__.py +++ b/osquery/__init__.py @@ -4,7 +4,7 @@ """ __title__ = "osquery" -__version__ = "3.0.7" +__version__ = "3.1.0" __author__ = "osquery authors" __license__ = "BSD" __copyright__ = "Copyright 2015-present, The osquery authors" From bb115d92f07a5eb10a856ec457bbf9919cd91f81 Mon Sep 17 00:00:00 2001 From: seph Date: Tue, 23 Jul 2024 23:44:37 -0400 Subject: [PATCH 6/6] readme and version --- README.md | 7 +++++++ osquery/__init__.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c4e895b..62290b0 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,13 @@ python setup.py install See [CONTRIBUTING.md](https://github.com/osquery/osquery-python/blob/master/CONTRIBUTING.md) and the [osquery wiki](https://osquery.readthedocs.org) for development information. +### How To Release + +1. Pick a version number +2. Update `osquery/__init__.py` to match +3. Use the GitHub release +4. Make sure the GitHub Action ran + ### Vulnerabilities Facebook has a [bug bounty](https://www.facebook.com/whitehat/) program that includes osquery. If you find a security vulnerability in osquery, please submit it via the process outlined on that page and do not file a public issue. For more information on finding vulnerabilities in osquery, see a recent blog post about [bug-hunting osquery](https://www.facebook.com/notes/facebook-bug-bounty/bug-hunting-osquery/954850014529225). diff --git a/osquery/__init__.py b/osquery/__init__.py index 01c5a06..280298b 100644 --- a/osquery/__init__.py +++ b/osquery/__init__.py @@ -4,7 +4,7 @@ """ __title__ = "osquery" -__version__ = "3.1.0" +__version__ = "3.1.1" __author__ = "osquery authors" __license__ = "BSD" __copyright__ = "Copyright 2015-present, The osquery authors"