Skip to content

Commit

Permalink
Fix pypi action
Browse files Browse the repository at this point in the history
  • Loading branch information
KateSakharova committed Jan 17, 2025
1 parent fe171f2 commit 9242465
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch: # Allows manual triggering
push:
tags:
- "v*" # Trigger on version tags
- "*.*.*" # Trigger on version tags

jobs:
create-release:
Expand Down Expand Up @@ -42,24 +42,31 @@ jobs:
run: |
tar -czf plots.tar.gz ./plots
- name: Create GitHub Release
- name: Create Draft GitHub Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
release_name: "Release ${{ github.ref_name }}"
body: "Automatically generated release ${{ github.ref_name }} with images."
draft: false
draft: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Archive to Release
uses: actions/upload-release-asset@v1
uses: actions/upload-release-asset@v1.0.1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./plots.tar.gz
asset_name: plots.tar.gz
asset_content_type: application/gzip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish release
uses: eregon/publish-release@v1
with:
release_id: ${{ steps.create_release.outputs.id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 5 additions & 3 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Upload Python Package

on:
release:
types: [published]
workflow_run:
workflows: ["Create Release with Images"]
types:
- completed

jobs:
build:
Expand Down Expand Up @@ -48,4 +50,4 @@ jobs:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 9242465

Please sign in to comment.