sn-module-gen 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sn_module_gen-0.1.0/.github/workflows/ci.yml +12 -0
- sn_module_gen-0.1.0/.github/workflows/publish.yml +122 -0
- sn_module_gen-0.1.0/.github/workflows/quality.yml +623 -0
- sn_module_gen-0.1.0/CHANGELOG.md +183 -0
- sn_module_gen-0.1.0/CONTRIBUTING.md +189 -0
- sn_module_gen-0.1.0/LICENSE +21 -0
- sn_module_gen-0.1.0/MANIFEST.in +13 -0
- sn_module_gen-0.1.0/PKG-INFO +356 -0
- sn_module_gen-0.1.0/README.md +319 -0
- sn_module_gen-0.1.0/architecture/decisions/0001-generated-ownership-and-transactions.md +50 -0
- sn_module_gen-0.1.0/architecture/decisions/0002-posix-symlink-preservation.md +34 -0
- sn_module_gen-0.1.0/architecture/decisions/0003-owner-confirmed-policies.md +44 -0
- sn_module_gen-0.1.0/ci/__init__.py +1 -0
- sn_module_gen-0.1.0/ci/check_filesystem_complexity.py +30 -0
- sn_module_gen-0.1.0/ci/check_transaction_complexity.py +39 -0
- sn_module_gen-0.1.0/ci/complexity_ratchet.py +75 -0
- sn_module_gen-0.1.0/ci/device_acceptance/App.tsx.tmpl +221 -0
- sn_module_gen-0.1.0/ci/device_acceptance/DeviceCounter.hpp +22 -0
- sn_module_gen-0.1.0/ci/device_acceptance/FeatureApi.kt +22 -0
- sn_module_gen-0.1.0/ci/device_acceptance/__init__.py +1 -0
- sn_module_gen-0.1.0/ci/device_acceptance/cases.json +42 -0
- sn_module_gen-0.1.0/ci/device_acceptance/device_probe.cpp +30 -0
- sn_module_gen-0.1.0/ci/device_acceptance/evidence.py +148 -0
- sn_module_gen-0.1.0/ci/device_acceptance/fixture_pdf.py +46 -0
- sn_module_gen-0.1.0/ci/device_acceptance/materialize.py +212 -0
- sn_module_gen-0.1.0/ci/fixtures/file_reader_test-9f626ed.bundle +0 -0
- sn_module_gen-0.1.0/ci/fixtures/supernote-module-generator-wiki.bundle +0 -0
- sn_module_gen-0.1.0/ci/materialize_readme_examples.py +76 -0
- sn_module_gen-0.1.0/ci/release-requirements.txt +6 -0
- sn_module_gen-0.1.0/ci/release_asset_preflight.py +61 -0
- sn_module_gen-0.1.0/ci/release_provenance.py +203 -0
- sn_module_gen-0.1.0/ci/reproducible_release_build.py +187 -0
- sn_module_gen-0.1.0/ci/run_file_reader_acceptance.py +365 -0
- sn_module_gen-0.1.0/ci/run_wiki_acceptance.py +512 -0
- sn_module_gen-0.1.0/ci/scaffold_release_fixture.py +46 -0
- sn_module_gen-0.1.0/ci/template_launch_contract.py +127 -0
- sn_module_gen-0.1.0/ci/verify_command_result.py +50 -0
- sn_module_gen-0.1.0/docs/ARCHITECTURE.md +400 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/README.md +15 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-bounded-note-doc-2026-08-27/README.md +79 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-bounded-note-doc-2026-08-27/corrected-note-menu.png +0 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-bounded-note-doc-2026-08-27/corrected-note-menu.xml +1 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-bounded-note-doc-2026-08-27/doc-allow-dialog.png +0 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-bounded-note-doc-2026-08-27/doc-allow-dialog.xml +1 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-bounded-note-doc-2026-08-27/doc-evidence.json +38 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-bounded-note-doc-2026-08-27/doc-exact-open.png +0 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-bounded-note-doc-2026-08-27/doc-exact-open.xml +1 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-bounded-note-doc-2026-08-27/doc-menu.png +0 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-bounded-note-doc-2026-08-27/doc-menu.xml +1 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-bounded-note-doc-2026-08-27/doc-reactnative.log +21 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-bounded-note-doc-2026-08-27/note-deny-dialog.png +0 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-bounded-note-doc-2026-08-27/note-deny-dialog.xml +1 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-bounded-note-doc-2026-08-27/note-evidence.json +38 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-bounded-note-doc-2026-08-27/note-reactnative.log +21 -0
- sn_module_gen-0.1.0/maintainers/device-evidence/v4-device-canary-2026-08-27.md +174 -0
- sn_module_gen-0.1.0/maintainers/release-notes-v0.1.0.md +15 -0
- sn_module_gen-0.1.0/maintainers/releasing.md +251 -0
- sn_module_gen-0.1.0/pyproject.toml +62 -0
- sn_module_gen-0.1.0/setup.cfg +74 -0
- sn_module_gen-0.1.0/src/sn_module_gen.egg-info/PKG-INFO +356 -0
- sn_module_gen-0.1.0/src/sn_module_gen.egg-info/SOURCES.txt +241 -0
- sn_module_gen-0.1.0/src/sn_module_gen.egg-info/dependency_links.txt +1 -0
- sn_module_gen-0.1.0/src/sn_module_gen.egg-info/entry_points.txt +2 -0
- sn_module_gen-0.1.0/src/sn_module_gen.egg-info/requires.txt +11 -0
- sn_module_gen-0.1.0/src/sn_module_gen.egg-info/top_level.txt +1 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/__init__.py +3 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/arguments.py +339 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/binding_codegen.py +4872 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cli.py +949 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cli_operations.py +1849 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/conversion.py +931 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/conversion_codegen.py +280 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cpp_class_syntax.py +140 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cpp_declarations.py +421 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cpp_function_syntax.py +312 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cpp_global_functions.py +85 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cpp_lexer.py +290 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cpp_member_semantics.py +113 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cpp_member_shapes.py +204 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cpp_members.py +129 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cpp_object_binding_codegen.py +1745 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cpp_object_runtime_codegen.py +286 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cpp_projection.py +781 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cpp_routes.py +501 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cpp_source_routing.py +83 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cpp_type_syntax.py +137 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/cross_family_codegen.py +695 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/devconfig.py +188 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/diagnostics.py +159 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/doctor.py +1835 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/errors.py +115 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/feature_cli_operations.py +1634 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/feature_generator.py +364 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/feature_identity.py +85 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/feature_model.py +334 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/feature_operations.py +475 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/feature_workflows.py +544 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/filesystem.py +3933 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/filesystem_inventory.py +336 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/frontend_discovery.py +104 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/generation_execution.py +241 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/generation_plan.py +688 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/generation_service.py +921 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/helptext.py +398 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/integration.py +42 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/integrity_manifest.py +858 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/interaction.py +853 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/internal_codegen.py +530 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/jsi_binding_decisions.py +72 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/jvm_codegen.py +2631 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/jvm_manifest.py +608 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/jvm_object_binding_codegen.py +2491 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/jvm_object_runtime_codegen.py +226 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/jvm_projection.py +615 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/jvm_routes.py +537 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/lowering.py +191 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/models.py +358 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/naming.py +205 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/operation_lock.py +151 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/platform_tools.py +58 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/plugin_build_integration.py +714 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/plugin_runtime_codegen.py +2472 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/project.py +150 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/project_model.py +537 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/reachability.py +293 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/readme_codegen.py +371 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/rendering.py +698 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/schemas/command-result.schema.json +261 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/schemas.py +22 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/semantic.py +1360 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/semantic_ir.py +198 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/semantic_types.py +260 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/source_models.py +491 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/subprocesses.py +180 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/template_contract.py +824 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/templates/runtime.SupernoteConstructor.java.tmpl +10 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/templates/runtime.SupernoteCoroutineBridge.kt.tmpl +42 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/templates/runtime.SupernoteModule.kt.tmpl +334 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/templates/runtime.SupernoteModuleProcessor.kt.tmpl +1211 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/templates/runtime.SupernotePluginAsync.java.tmpl +10 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/templates/runtime.SupernotePluginExport.java.tmpl +15 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/templates/runtime.SupernotePluginInternal.java.tmpl +10 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/templates/runtime.SupernotePluginObject.java.tmpl +10 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/templates/runtime.SupernotePluginValue.java.tmpl +10 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/templates/runtime.processor.provider.tmpl +1 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/templates.py +20 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/terminal_text.py +110 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/transaction.py +4233 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/transaction_registry.py +275 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/typescript_codegen.py +236 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/validation.py +517 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/verification.py +51 -0
- sn_module_gen-0.1.0/src/supernote_module_generator/windows_authority.py +519 -0
- sn_module_gen-0.1.0/tests/conftest.py +57 -0
- sn_module_gen-0.1.0/tests/fixtures/cpp_resolution/accept_exact_qualified_reference.hpp +10 -0
- sn_module_gen-0.1.0/tests/fixtures/cpp_resolution/accept_forward_then_marked_definition.hpp +6 -0
- sn_module_gen-0.1.0/tests/fixtures/cpp_resolution/accept_global_complete.hpp +2 -0
- sn_module_gen-0.1.0/tests/fixtures/cpp_resolution/accept_named_namespace.hpp +4 -0
- sn_module_gen-0.1.0/tests/fixtures/cpp_resolution/accept_nested_namespace.hpp +4 -0
- sn_module_gen-0.1.0/tests/fixtures/cpp_resolution/accept_unqualified_enclosing.hpp +9 -0
- sn_module_gen-0.1.0/tests/fixtures/cpp_resolution/cases.json +19 -0
- sn_module_gen-0.1.0/tests/fixtures/cpp_resolution/reject_alias_signature.hpp +12 -0
- sn_module_gen-0.1.0/tests/fixtures/cpp_resolution/reject_ambiguous_unqualified.hpp +16 -0
- sn_module_gen-0.1.0/tests/fixtures/cpp_resolution/reject_anonymous_namespace.hpp +4 -0
- sn_module_gen-0.1.0/tests/fixtures/cpp_resolution/reject_forward_only.hpp +2 -0
- sn_module_gen-0.1.0/tests/fixtures/cpp_resolution/reject_marked_alias.hpp +6 -0
- sn_module_gen-0.1.0/tests/fixtures/cpp_resolution/reject_nested_type.hpp +5 -0
- sn_module_gen-0.1.0/tests/fixtures/cpp_resolution/reject_public_name_collision.hpp +8 -0
- sn_module_gen-0.1.0/tests/fixtures/typescript/consumer.ts +79 -0
- sn_module_gen-0.1.0/tests/fixtures/typescript/index.d.ts +113 -0
- sn_module_gen-0.1.0/tests/project_inventory.py +189 -0
- sn_module_gen-0.1.0/tests/test_arguments.py +289 -0
- sn_module_gen-0.1.0/tests/test_binding_codegen.py +1993 -0
- sn_module_gen-0.1.0/tests/test_cli.py +2111 -0
- sn_module_gen-0.1.0/tests/test_cpp_class_syntax.py +65 -0
- sn_module_gen-0.1.0/tests/test_cpp_declarations.py +346 -0
- sn_module_gen-0.1.0/tests/test_cpp_function_syntax.py +312 -0
- sn_module_gen-0.1.0/tests/test_cpp_global_functions.py +71 -0
- sn_module_gen-0.1.0/tests/test_cpp_lexer.py +89 -0
- sn_module_gen-0.1.0/tests/test_cpp_member_semantics.py +152 -0
- sn_module_gen-0.1.0/tests/test_cpp_member_shapes.py +224 -0
- sn_module_gen-0.1.0/tests/test_cpp_members.py +157 -0
- sn_module_gen-0.1.0/tests/test_cpp_resolution_contract.py +39 -0
- sn_module_gen-0.1.0/tests/test_cpp_source_routing.py +72 -0
- sn_module_gen-0.1.0/tests/test_cpp_type_syntax.py +141 -0
- sn_module_gen-0.1.0/tests/test_devconfig.py +432 -0
- sn_module_gen-0.1.0/tests/test_device_acceptance_pack.py +283 -0
- sn_module_gen-0.1.0/tests/test_doctor_spec.py +1425 -0
- sn_module_gen-0.1.0/tests/test_documentation.py +297 -0
- sn_module_gen-0.1.0/tests/test_feature_generator.py +256 -0
- sn_module_gen-0.1.0/tests/test_feature_identity.py +90 -0
- sn_module_gen-0.1.0/tests/test_feature_metadata_diagnostics.py +236 -0
- sn_module_gen-0.1.0/tests/test_feature_model.py +173 -0
- sn_module_gen-0.1.0/tests/test_feature_operations.py +68 -0
- sn_module_gen-0.1.0/tests/test_filesystem_inventory.py +347 -0
- sn_module_gen-0.1.0/tests/test_generation_service.py +542 -0
- sn_module_gen-0.1.0/tests/test_guided_spec.py +338 -0
- sn_module_gen-0.1.0/tests/test_integrity_manifest.py +133 -0
- sn_module_gen-0.1.0/tests/test_interaction_spec.py +346 -0
- sn_module_gen-0.1.0/tests/test_internal_codegen.py +77 -0
- sn_module_gen-0.1.0/tests/test_jsi_binding_decisions.py +93 -0
- sn_module_gen-0.1.0/tests/test_json_schema.py +1663 -0
- sn_module_gen-0.1.0/tests/test_jvm_manifest_projection.py +762 -0
- sn_module_gen-0.1.0/tests/test_models.py +601 -0
- sn_module_gen-0.1.0/tests/test_naming_spec.py +103 -0
- sn_module_gen-0.1.0/tests/test_operation_lock.py +267 -0
- sn_module_gen-0.1.0/tests/test_operations_spec.py +2110 -0
- sn_module_gen-0.1.0/tests/test_packaging.py +652 -0
- sn_module_gen-0.1.0/tests/test_phase0_schemas.py +106 -0
- sn_module_gen-0.1.0/tests/test_phase2_frontends.py +797 -0
- sn_module_gen-0.1.0/tests/test_phase3_reachability_typescript.py +428 -0
- sn_module_gen-0.1.0/tests/test_phase4_conversion.py +528 -0
- sn_module_gen-0.1.0/tests/test_phase4_generated_kernels.py +234 -0
- sn_module_gen-0.1.0/tests/test_phase5_cpp_object_runtime.py +330 -0
- sn_module_gen-0.1.0/tests/test_phase5_cpp_routes.py +412 -0
- sn_module_gen-0.1.0/tests/test_phase6_jvm_routes.py +547 -0
- sn_module_gen-0.1.0/tests/test_phase7_cross_family.py +315 -0
- sn_module_gen-0.1.0/tests/test_plain_ascii_spec.py +239 -0
- sn_module_gen-0.1.0/tests/test_platform_paths.py +383 -0
- sn_module_gen-0.1.0/tests/test_platform_tools.py +71 -0
- sn_module_gen-0.1.0/tests/test_plugin_build_integration.py +226 -0
- sn_module_gen-0.1.0/tests/test_plugin_runtime_codegen.py +1471 -0
- sn_module_gen-0.1.0/tests/test_project.py +65 -0
- sn_module_gen-0.1.0/tests/test_project_model.py +67 -0
- sn_module_gen-0.1.0/tests/test_readme_codegen.py +350 -0
- sn_module_gen-0.1.0/tests/test_regression_harness.py +162 -0
- sn_module_gen-0.1.0/tests/test_release_qualification.py +676 -0
- sn_module_gen-0.1.0/tests/test_rendering_spec.py +317 -0
- sn_module_gen-0.1.0/tests/test_semantic_model.py +692 -0
- sn_module_gen-0.1.0/tests/test_semantic_plan.py +303 -0
- sn_module_gen-0.1.0/tests/test_spec_smoke.py +223 -0
- sn_module_gen-0.1.0/tests/test_static_safeguards.py +243 -0
- sn_module_gen-0.1.0/tests/test_subprocesses.py +136 -0
- sn_module_gen-0.1.0/tests/test_template_contract.py +2691 -0
- sn_module_gen-0.1.0/tests/test_transaction_registry.py +339 -0
- sn_module_gen-0.1.0/tests/test_transaction_spec.py +2983 -0
- sn_module_gen-0.1.0/tests/test_typescript_codegen.py +106 -0
- sn_module_gen-0.1.0/tests/test_unsupported_legacy.py +697 -0
- sn_module_gen-0.1.0/tests/test_validation.py +551 -0
- sn_module_gen-0.1.0/tests/test_verification.py +122 -0
- sn_module_gen-0.1.0/tests/test_windows_authority.py +127 -0
- sn_module_gen-0.1.0/tests/test_windows_filesystem_state_machine.py +2943 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
name: Publish sn-module-gen to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions: {}
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
release-contract:
|
|
11
|
+
name: Verify first-public release event
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Require the exact stable release tag
|
|
15
|
+
env:
|
|
16
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
17
|
+
RELEASE_PRERELEASE: ${{ github.event.release.prerelease }}
|
|
18
|
+
run: |
|
|
19
|
+
test "$RELEASE_TAG" = "v0.1.0"
|
|
20
|
+
test "$GITHUB_REF" = "refs/tags/$RELEASE_TAG"
|
|
21
|
+
test "$RELEASE_PRERELEASE" = "false"
|
|
22
|
+
|
|
23
|
+
qualify:
|
|
24
|
+
name: Qualify exact release commit
|
|
25
|
+
needs: release-contract
|
|
26
|
+
uses: ./.github/workflows/quality.yml
|
|
27
|
+
with:
|
|
28
|
+
release_tag: ${{ github.event.release.tag_name }}
|
|
29
|
+
permissions:
|
|
30
|
+
contents: read
|
|
31
|
+
|
|
32
|
+
release-assets:
|
|
33
|
+
name: Attach qualified release assets
|
|
34
|
+
needs: qualify
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
permissions:
|
|
37
|
+
contents: write
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v7
|
|
40
|
+
with:
|
|
41
|
+
ref: ${{ github.sha }}
|
|
42
|
+
- name: Verify exact source commit
|
|
43
|
+
run: test "$(git rev-parse HEAD)" = "$GITHUB_SHA"
|
|
44
|
+
- uses: actions/setup-python@v7
|
|
45
|
+
with:
|
|
46
|
+
python-version: "3.13"
|
|
47
|
+
- name: Retrieve release distributions
|
|
48
|
+
uses: actions/download-artifact@v8
|
|
49
|
+
with:
|
|
50
|
+
name: python-package-distributions-${{ github.sha }}
|
|
51
|
+
path: dist/
|
|
52
|
+
- name: Retrieve release provenance
|
|
53
|
+
uses: actions/download-artifact@v8
|
|
54
|
+
with:
|
|
55
|
+
name: python-package-provenance-${{ github.sha }}
|
|
56
|
+
path: provenance/
|
|
57
|
+
- name: Verify qualified release provenance
|
|
58
|
+
run: >-
|
|
59
|
+
python ci/release_provenance.py verify
|
|
60
|
+
dist provenance
|
|
61
|
+
--repository "$GITHUB_REPOSITORY"
|
|
62
|
+
--commit "$GITHUB_SHA"
|
|
63
|
+
- name: Refuse to replace an existing release asset
|
|
64
|
+
env:
|
|
65
|
+
GH_TOKEN: ${{ github.token }}
|
|
66
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
67
|
+
run: |
|
|
68
|
+
gh release view "$RELEASE_TAG" \
|
|
69
|
+
--repo "$GITHUB_REPOSITORY" \
|
|
70
|
+
--json assets > "$RUNNER_TEMP/existing-release-assets.json"
|
|
71
|
+
python ci/release_asset_preflight.py \
|
|
72
|
+
"$RUNNER_TEMP/existing-release-assets.json" \
|
|
73
|
+
dist provenance
|
|
74
|
+
- name: Attach qualified distributions and checksums
|
|
75
|
+
env:
|
|
76
|
+
GH_TOKEN: ${{ github.token }}
|
|
77
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
78
|
+
run: >-
|
|
79
|
+
gh release upload "$RELEASE_TAG"
|
|
80
|
+
dist/*.whl dist/*.tar.gz
|
|
81
|
+
provenance/SHA256SUMS provenance/release-provenance.json
|
|
82
|
+
--repo "$GITHUB_REPOSITORY"
|
|
83
|
+
|
|
84
|
+
publish:
|
|
85
|
+
name: Publish qualified release to PyPI
|
|
86
|
+
needs: [qualify, release-assets]
|
|
87
|
+
runs-on: ubuntu-latest
|
|
88
|
+
environment:
|
|
89
|
+
name: pypi
|
|
90
|
+
url: https://pypi.org/project/sn-module-gen/
|
|
91
|
+
permissions:
|
|
92
|
+
contents: read
|
|
93
|
+
id-token: write
|
|
94
|
+
steps:
|
|
95
|
+
- uses: actions/checkout@v7
|
|
96
|
+
with:
|
|
97
|
+
ref: ${{ github.sha }}
|
|
98
|
+
- name: Verify exact source commit
|
|
99
|
+
run: test "$(git rev-parse HEAD)" = "$GITHUB_SHA"
|
|
100
|
+
- uses: actions/setup-python@v7
|
|
101
|
+
with:
|
|
102
|
+
python-version: "3.13"
|
|
103
|
+
- name: Retrieve release distributions
|
|
104
|
+
uses: actions/download-artifact@v8
|
|
105
|
+
with:
|
|
106
|
+
name: python-package-distributions-${{ github.sha }}
|
|
107
|
+
path: dist/
|
|
108
|
+
- name: Retrieve release provenance
|
|
109
|
+
uses: actions/download-artifact@v8
|
|
110
|
+
with:
|
|
111
|
+
name: python-package-provenance-${{ github.sha }}
|
|
112
|
+
path: provenance/
|
|
113
|
+
- name: Verify qualified release provenance
|
|
114
|
+
run: >-
|
|
115
|
+
python ci/release_provenance.py verify
|
|
116
|
+
dist provenance
|
|
117
|
+
--repository "$GITHUB_REPOSITORY"
|
|
118
|
+
--commit "$GITHUB_SHA"
|
|
119
|
+
- name: Publish qualified release distributions
|
|
120
|
+
uses: pypa/gh-action-pypi-publish@v1.14.2
|
|
121
|
+
with:
|
|
122
|
+
packages-dir: dist/
|