diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index b574138d..8a4eb5fa 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -4,7 +4,7 @@ description: Installs the given GardenLinux Python library inputs: version: description: GardenLinux Python library version - default: "1.0.7" + default: "1.0.8" python_version: description: Python version to setup default: "3.14" diff --git a/pyproject.toml b/pyproject.toml index 40135c57..af5711c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "gardenlinux" -version = "1.0.7" +version = "1.0.8" description = "Contains tools to work with the features directory of gardenlinux, for example deducting dependencies from feature sets or validating cnames" authors = ["Garden Linux Maintainers "] license = "Apache-2.0" diff --git a/src/gardenlinux/github/release/__main__.py b/src/gardenlinux/github/release/__main__.py index a1b97dff..ca44871e 100644 --- a/src/gardenlinux/github/release/__main__.py +++ b/src/gardenlinux/github/release/__main__.py @@ -129,6 +129,7 @@ def get_parser() -> argparse.ArgumentParser: upload_parser.add_argument( "--release-id", + type=int, required=True, help="GitHub release ID to upload the file to (required).", ) diff --git a/tests/github/test_main.py b/tests/github/test_main.py index 5f9e9480..2abf5b60 100644 --- a/tests/github/test_main.py +++ b/tests/github/test_main.py @@ -148,7 +148,7 @@ def test_script_upload_needs_github_token( "--repo", "gardenlinux", "--release-id", - TEST_GARDENLINUX_RELEASE_MINOR, + "1", "--file", str(artifact_for_upload), "--dry-run", @@ -192,7 +192,7 @@ def test_script_upload_dry_run( ) m.get( - f"//api.github.com:443/repos/gardenlinux/gardenlinux/releases/tags/{TEST_GARDENLINUX_RELEASE_MINOR}", + "//api.github.com:443/repos/gardenlinux/gardenlinux/releases/1", json=RELEASE_JSON, status_code=200, ) @@ -208,7 +208,7 @@ def test_script_upload_dry_run( "--repo", "gardenlinux", "--release-id", - TEST_GARDENLINUX_RELEASE_MINOR, + "1", "--file", str(artifact_for_upload), "--dry-run", @@ -245,17 +245,11 @@ def test_script_upload_inaccessible_file( ) m.get( - f"//api.github.com:443/repos/gardenlinux/gardenlinux/releases/tags/{TEST_GARDENLINUX_RELEASE_MINOR}", + "//api.github.com:443/repos/gardenlinux/gardenlinux/releases/1", json=RELEASE_JSON, status_code=200, ) - m.post( - f"//uploads.github.com:443/repos/gardenlinux/gardenlinux/releases/{TEST_GARDENLINUX_RELEASE_MINOR}/assets?name=artifact.log", - text="{}", - status_code=201, - ) - monkeypatch.setattr( sys, "argv", @@ -267,7 +261,7 @@ def test_script_upload_inaccessible_file( "--repo", "gardenlinux", "--release-id", - TEST_GARDENLINUX_RELEASE_MINOR, + "1", "--file", str(artifact_for_upload), ], @@ -296,12 +290,6 @@ def test_script_upload( status_code=200, ) - m.get( - f"//api.github.com:443/repos/gardenlinux/gardenlinux/releases/tags/{TEST_GARDENLINUX_RELEASE_MINOR}", - json=RELEASE_JSON, - status_code=200, - ) - m.post( "//uploads.github.com:443/repos/gardenlinux/gardenlinux/releases/1/assets?label=&name=artifact.log", json={}, @@ -319,7 +307,7 @@ def test_script_upload( "--repo", "gardenlinux", "--release-id", - TEST_GARDENLINUX_RELEASE_MINOR, + "1", "--file", str(artifact_for_upload), ],