diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index fbee19a8d..26c091461 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -13,7 +13,6 @@ on: - 'master' paths: - '**' - workflow_dispatch: permissions: diff --git a/.github/workflows/CI_Windows.yml b/.github/workflows/CI_Windows.yml index 6a1100249..74056e8ab 100644 --- a/.github/workflows/CI_Windows.yml +++ b/.github/workflows/CI_Windows.yml @@ -13,7 +13,6 @@ on: - 'master' paths: - '**' - workflow_dispatch: jobs: diff --git a/.github/workflows/CI_apptainer.yml b/.github/workflows/CI_apptainer.yml index f9ee538e3..015f0685d 100644 --- a/.github/workflows/CI_apptainer.yml +++ b/.github/workflows/CI_apptainer.yml @@ -13,6 +13,7 @@ on: - 'master' paths: - '**' + workflow_dispatch: jobs: test: diff --git a/.github/workflows/CI_docker.yml b/.github/workflows/CI_docker.yml index 7e61ee306..7e06a89ea 100644 --- a/.github/workflows/CI_docker.yml +++ b/.github/workflows/CI_docker.yml @@ -13,6 +13,7 @@ on: - 'master' paths: - '**' + workflow_dispatch: jobs: test: diff --git a/.github/workflows/CI_mac.yml b/.github/workflows/CI_mac.yml index d56c965c3..53a93af4a 100644 --- a/.github/workflows/CI_mac.yml +++ b/.github/workflows/CI_mac.yml @@ -13,7 +13,6 @@ on: - 'master' paths: - '**' - workflow_dispatch: jobs: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2f61639b3..3a32749de 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -8,6 +8,7 @@ on: branches: [ "master" ] schedule: - cron: '28 17 * * 1' + workflow_dispatch: jobs: analyze: diff --git a/.github/workflows/update_backend.yml b/.github/workflows/update_backend.yml index 77f2f37f0..ea9c051e4 100644 --- a/.github/workflows/update_backend.yml +++ b/.github/workflows/update_backend.yml @@ -40,7 +40,7 @@ jobs: run: | if git diff --quiet pysr/juliapkg.json; then echo "No changes to pysr/juliapkg.json. Restoring changes." - git restore pyproject.toml + git restore pyproject.toml .release-please-manifest.json fi - name: "Create PR if necessary" @@ -48,14 +48,15 @@ jobs: uses: peter-evans/create-pull-request@v8 with: branch: backend-update/v${{ steps.get-latest.outputs.version }} - title: "Automated update to backend: v${{ steps.get-latest.outputs.version }}" + title: "chore: update backend to v${{ steps.get-latest.outputs.version }}" body: | This PR was automatically generated by the GitHub Action `.github/workflows/update-backend.yml` It updates the backend version to v${{ steps.get-latest.outputs.version }}. For a full description of the changes, see the backend changelog: [v${{ steps.get-latest.outputs.version }}](https://github.com/MilesCranmer/SymbolicRegression.jl/releases/tag/v${{ steps.get-latest.outputs.version }}). delete-branch: true - commit-message: "Update backend version to v${{ steps.get-latest.outputs.version }}" + commit-message: "chore: update backend to v${{ steps.get-latest.outputs.version }}" add-paths: | + .release-please-manifest.json pyproject.toml pysr/juliapkg.json @@ -66,5 +67,9 @@ jobs: run: | ref="backend-update/v${{ steps.get-latest.outputs.version }}" gh workflow run "Linux" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true - gh workflow run "macOS" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true gh workflow run "Windows" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true + gh workflow run "macOS" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true + gh workflow run "Docker" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true + gh workflow run "Apptainer" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true + gh workflow run "Documentation" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true + gh workflow run "CodeQL" --repo "$GITHUB_REPOSITORY" --ref "$ref" || true diff --git a/.github/workflows/update_backend_version.py b/.github/workflows/update_backend_version.py index 301896532..dd6c79123 100644 --- a/.github/workflows/update_backend_version.py +++ b/.github/workflows/update_backend_version.py @@ -9,8 +9,10 @@ assert not new_backend_version.startswith("v"), "Version should not start with 'v'" -pyproject_toml = Path(__file__).parent / ".." / ".." / "pyproject.toml" -juliapkg_json = Path(__file__).parent / ".." / ".." / "pysr" / "juliapkg.json" +repo_root = Path(__file__).parent / ".." / ".." +pyproject_toml = repo_root / "pyproject.toml" +juliapkg_json = repo_root / "pysr" / "juliapkg.json" +release_please_manifest = repo_root / ".release-please-manifest.json" with open(pyproject_toml) as toml_file: pyproject_data = tomlkit.parse(toml_file.read()) @@ -18,6 +20,9 @@ with open(juliapkg_json) as f: juliapkg_data = json.load(f) +with open(release_please_manifest) as f: + release_please_manifest_data = json.load(f) + current_version = pyproject_data["project"]["version"] parts = current_version.split(".") @@ -52,6 +57,7 @@ new_version = f"{major}.{minor}.{new_patch}{new_suffix}{extra_parts}" pyproject_data["project"]["version"] = new_version +release_please_manifest_data["."] = new_version # Update backend - maintain current format (either "rev" or "version") backend_pkg = juliapkg_data["packages"]["SymbolicRegression"] @@ -69,5 +75,8 @@ with open(juliapkg_json, "w") as f: json.dump(juliapkg_data, f, indent=4) - # Ensure ends with newline + f.write("\n") + +with open(release_please_manifest, "w") as f: + json.dump(release_please_manifest_data, f, indent=2) f.write("\n")