-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1bda7c7
commit 1cd0989
Showing
1 changed file
with
20 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
publish_artifacts: | ||
description: 'Publish artifacts (Y|N)' | ||
required: true | ||
default: 'N' | ||
This comment has been minimized.
Sorry, something went wrong. |
||
release: | ||
types: [published] | ||
push: | ||
|
@@ -40,9 +46,9 @@ jobs: | |
if: matrix.python-version == '3.10' | ||
|
||
- name: Publish CSS files | ||
uses: actions/upload-artifact@master | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist-package-css | ||
name: arts-package-css | ||
path: styles/dist | ||
if: matrix.python-version == '3.10' | ||
|
||
|
@@ -104,21 +110,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 | ||
|
@@ -145,18 +152,20 @@ jobs: | |
TWINE_PASSWORD: ${{ secrets.pypi_password }} | ||
|
||
- name: Download CSS pack | ||
uses: actions/download-artifact@v2 | ||
uses: actions/download-artifact@v4 | ||
if: github.event_name == 'release' | ||
with: | ||
name: dist-package-css | ||
path: dist-css | ||
name: arts-package-css | ||
path: arts-css | ||
|
||
- name: Add CSS package to the release | ||
uses: actions/[email protected] | ||
if: github.event_name == 'release' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./dist-css/neoteroi-mkdocs.css | ||
asset_path: ./arts-css/neoteroi-mkdocs.css | ||
asset_name: css-${{ github.event.release.tag_name }}.css | ||
asset_content_type: text/css | ||
continue-on-error: true |
I suggest adding
Allows you to select an option, rather thantyping it out, tho, default may not work anymore, so the order is probably important here (meaning N would need to come first)