diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81e675f..3019a84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: "ci" +name: "CI" on: - push diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 98f8640..6616f1e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,38 +1,26 @@ -name: Upload Python Package +name: Bump version and publish on: - release: - types: [published] + workflow_run: + workflows: [ "CI" ] + types: [ completed ] jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout [${{ github.repository }}] - uses: actions/checkout@v4 + tag: + permissions: + contents: write - - uses: cvxgrp/.github/actions/uv/build@v2.0.8 + if: > + github.event.workflow_run.conclusion == 'success' && + github.event.workflow_run.head_branch == 'main' - deploy: runs-on: ubuntu-latest - needs: build - environment: release - - permissions: - # This permission is required for trusted publishing. - id-token: write steps: - name: Checkout [${{ github.repository }}] uses: actions/checkout@v4 - # download dist from build - - uses: actions/download-artifact@v4 - with: - name: dist - path: dist - - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Generate Tag + uses: cvxgrp/.github/actions/uv/tag@v2.0.9 with: - repository-url: https://upload.pypi.org/legacy/ + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7ad8047..68d731f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,14 +34,6 @@ repos: - id: check-github-workflows args: ["--verbose"] - - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.5 - hooks: - - id: insert-license - files: ^(cvx) - args: - ['--license-filepath', 'copyright.txt', '--no-extra-eol'] - - repo: https://github.com/rhysd/actionlint rev: v1.7.7 hooks: diff --git a/copyright.txt b/copyright.txt deleted file mode 100644 index 4d37640..0000000 --- a/copyright.txt +++ /dev/null @@ -1,13 +0,0 @@ - Copyright 2023 Stanford University Convex Optimization Group - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License.