Skip to content

Commit

Permalink
Update release.yml (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
tschm authored Feb 1, 2025
1 parent 0c30eee commit e00ac88
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,51 @@
name: Upload Python Package
name: Bump version and publish

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

jobs:
build:
tag:
permissions:
contents: write

#if: >
# github.event_name == 'workflow_dispatch' ||
# (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/build@v2.0.13
- name: Generate Tag
uses: cvxgrp/.github/actions/uv/tag@v2.0.12
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
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://upload.pypi.org/legacy/

0 comments on commit e00ac88

Please sign in to comment.