Skip to content

Commit bce2e38

Browse files
committed
ci(tests): Move release to conditional job, requiring pass
1 parent 8ce93aa commit bce2e38

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.github/workflows/tests.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
python-version: ["3.7", "3.10"]
14-
tmux-version: ["2.6", "2.7", "2.8", "3.0a", "3.1b", "3.2a", "3.3a", "master"]
14+
tmux-version: ["2.6", "2.7", "2.8", "3.0a", "3.1b", "3.2", "3.2a", "3.3", "3.3a", "master"]
1515
steps:
1616
- uses: actions/checkout@v3
1717

@@ -68,6 +68,7 @@ jobs:
6868
export PATH=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin:$PATH
6969
ls $HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin
7070
tmux -V
71+
sudo apt install cowsay
7172
poetry run py.test --cov=./ --cov-append --cov-report=xml
7273
env:
7374
COV_CORE_SOURCE: .
@@ -77,14 +78,19 @@ jobs:
7778
with:
7879
token: ${{ secrets.CODECOV_TOKEN }}
7980

81+
release:
82+
runs-on: ubuntu-latest
83+
needs: build
84+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
85+
steps:
8086
- name: Build package
8187
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
8288
run: poetry build
8389

84-
# - name: Publish package
85-
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
86-
# uses: pypa/gh-action-pypi-publish@release/v1
87-
# with:
88-
# user: __token__
89-
# password: ${{ secrets.PYPI_API_TOKEN }}
90-
# skip_existing: true
90+
- name: Publish package
91+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
92+
uses: pypa/gh-action-pypi-publish@release/v1
93+
with:
94+
user: __token__
95+
password: ${{ secrets.PYPI_API_TOKEN }}
96+
skip_existing: true

0 commit comments

Comments
 (0)