Skip to content

Commit

Permalink
Workflow maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertoPrevato committed Feb 1, 2024
1 parent 1bda7c7 commit 1426a5d
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Build

on:
workflow_dispatch:
publish_artifacts:
description: 'Publish artifacts (Y|N)'
required: true
default: 'N'
release:
types: [published]
push:
Expand Down Expand Up @@ -104,21 +109,22 @@ jobs:
if: matrix.python-version == '3.11'

- name: Upload distribution package
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v4
with:
name: dist
name: dist-${{ matrix.os }}-${{ matrix.python-version }}
path: dist
if: matrix.python-version == '3.11'

publish:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish_artifacts == 'Y')
steps:
- name: Download the distribution package
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: dist
pattern: dist-*
merge-multiple: true
path: dist

- name: Use Python 3.11
Expand Down

0 comments on commit 1426a5d

Please sign in to comment.