Skip to content

Commit

Permalink
release following push to main (#461)
Browse files Browse the repository at this point in the history
  • Loading branch information
tschm authored Jan 28, 2025
1 parent 8166d8a commit 82f22f2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "ci"
name: "CI"

on:
- push
Expand Down
30 changes: 20 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,48 @@
name: Upload Python Package
name: Bump version and publish

on:
release:
types: [published]
workflow_run:
workflows: [ "CI" ]
types: [ completed ]

jobs:
build:
tag:
permissions:
contents: write

if: >
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'main'
runs-on: ubuntu-latest

steps:
- name: Checkout [${{ github.repository }}]
uses: actions/checkout@v4

- uses: cvxgrp/.github/actions/uv/[email protected]
- name: Generate Tag
uses: cvxgrp/.github/actions/uv/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

deploy:
publish:
needs: tag
runs-on: ubuntu-latest
needs: build
environment: release

permissions:
contents: read
# 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
with:
repository-url: https://upload.pypi.org/legacy/

0 comments on commit 82f22f2

Please sign in to comment.