Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonstyle authored Feb 19, 2024
1 parent bdc695a commit 30dcd1e
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,23 @@ on:
workflow_dispatch:
inputs:
publish-release:
description: "Publish Release"
required: false
type: boolean
default: false
production-release:
description: "Production Release"
required: false
type: boolean
default: false
increment-version:
description: "Increment Version"
required: false
type: choice
options:
- patch
- minor
- major
jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -44,8 +57,9 @@ jobs:
jlpm run test
- name: Increment the Version
if: ${{ inputs.increment-version }}
run: |
hatch version patch
hatch version ${{ inputs.increment-version }}
# Commit all changed files back to the repository
- uses: stefanzweifel/git-auto-commit-action@v5
Expand All @@ -61,16 +75,17 @@ jobs:
sed -i 's/"@quarto\/jupyterlab-quarto"/"jupyterlab-quarto"/g' package.json
python -m build
sed -i 's/"jupyterlab-quarto"/"@quarto\/jupyterlab-quarto"/g' package.json
jlpm
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ ! inputs.publish-release }}
if: ${{ publish-release && ! inputs.production-release }}
with:
repository-url: https://test.pypi.org/legacy/

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ inputs.publish-release }}
if: ${{ publish-release && inputs.production-release }}

- name: Build the NPM Front End
run: |
Expand All @@ -80,4 +95,4 @@ jobs:
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
if: ${{ inputs.publish-release }}
if: ${{ publish-release && inputs.production-release }}

0 comments on commit 30dcd1e

Please sign in to comment.