Skip to content

Commit f85abd7

Browse files
committed
testing win
1 parent f6c3706 commit f85abd7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/release_and_pypi.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@ on:
55
workflows: ["Build Macos", "Build linux", "Build win"]
66
types:
77
- completed
8+
push:
9+
branches:
10+
- sep-workflows
11+
tags:
12+
- "v*"
813

914
jobs:
1015
release_and_publish:
1116
name: Release and Publish
1217
runs-on: ubuntu-latest
13-
if: ${{ github.event.workflow_run.conclusion == 'success' && startsWith(github.ref, 'refs/tags/') }}
18+
if: ${{ (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) }}
1419
steps:
1520
- name: Checkout code
1621
uses: actions/checkout@v3
@@ -44,6 +49,7 @@ jobs:
4449
working-directory: dist
4550

4651
- name: Publish to TestPyPI
52+
if: startsWith(github.ref, 'refs/tags/')
4753
uses: pypa/gh-action-pypi-publish@v1.8.5
4854
with:
4955
user: __token__
@@ -52,6 +58,7 @@ jobs:
5258
packages-dir: dist
5359

5460
- name: Create Release
61+
if: startsWith(github.ref, 'refs/tags/')
5562
env:
5663
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5764
uses: softprops/action-gh-release@v1

0 commit comments

Comments
 (0)