Skip to content

Commit 8769671

Browse files
committed
Fixed versioning
1 parent 463082b commit 8769671

File tree

2 files changed

+27
-34
lines changed

2 files changed

+27
-34
lines changed

.github/workflows/bumpversion.yaml

+17-24
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,6 @@ on:
44
types: [closed]
55
branches: [master]
66
workflow_dispatch:
7-
inputs:
8-
dry_run:
9-
description: Don't actually do the work, just describe it
10-
default: true
11-
type: boolean
12-
new_version:
13-
description: Set the version to a specific value
14-
required: false
15-
type: string
16-
verbose:
17-
description: The amount of output detail
18-
default: 0
19-
type: choice
20-
options:
21-
- "0"
22-
- "1"
23-
- "2"
247

258
jobs:
269
bumpversion:
@@ -54,34 +37,44 @@ jobs:
5437
echo "::notice::Suggested release type is: ${RELEASE_KIND}"
5538
echo "RELEASE_KIND=$RELEASE_KIND" >> $GITHUB_ENV
5639
echo "release-kind=$RELEASE_KIND" >> $GITHUB_OUTPUT
40+
echo "PACKAGE=false" >> $GITHUB_ENV
5741
5842
- name: Bump Version auto
5943
if: ${{ github.event_name != 'workflow_dispatch' }}
6044
shell: bash
6145
run: |
6246
if [[ $RELEASE_KIND != "no-release" ]]; then
63-
bump-my-version -v "$RELEASE_KIND"
47+
bump-my-version bump -v "$RELEASE_KIND"
6448
git push
6549
git push --tags
50+
echo "PACKAGE=true" >> $GITHUB_ENV
6651
fi
6752
6853
- name: Bump Version manual
6954
if: ${{ github.event_name == 'workflow_dispatch' }}
7055
shell: bash
71-
env:
72-
BUMPVERSION_DRY_RUN: ${{ inputs.dry_run }}
73-
BUMPVERSION_NEW_VERSION: ${{ inputs.tags }}
74-
BUMPVERSION_VERBOSE: ${{ inputs.verbose }}
7556
run: |
7657
case "$RELEASE_KIND" in
7758
major|minor|patch)
7859
bump-my-version bump "$RELEASE_KIND"
7960
if [[ BUMPVERSION_DRY_RUN == "false" ]]; then
8061
git push
8162
git push --tags
63+
echo "PACKAGE=true" >> $GITHUB_ENV
8264
fi
8365
;;
84-
release-candidate)
85-
bump-my-version bump --no-commit "$RELEASE_KIND"
66+
dev)
67+
bump-my-version bump -v --no-commit "$RELEASE_KIND"
68+
echo "PACKAGE=true" >> $GITHUB_ENV
8669
;;
8770
esac
71+
72+
- name: Package
73+
if: ${{ env.PACKAGE == 'true' }}
74+
uses: hynek/build-and-inspect-python-package@v1
75+
76+
- name: Upload dev release to PyPI
77+
if: ${{ env.PACKAGE == 'true' && env.RELEASE_KIND == 'dev' }}
78+
uses: pypa/gh-action-pypi-publish@release/v1
79+
with:
80+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/release.yaml

+10-10
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ on:
1111

1212
jobs:
1313
# Package when a new tag is pushed
14-
build-package:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v3
18-
with:
19-
fetch-depth: 0
20-
token: ${{ secrets.PAT }}
21-
22-
- name: Package
23-
uses: hynek/build-and-inspect-python-package@v1
14+
# build-package:
15+
# runs-on: ubuntu-latest
16+
# steps:
17+
# - uses: actions/checkout@v3
18+
# with:
19+
# fetch-depth: 0
20+
# token: ${{ secrets.PAT }}
21+
#
22+
# - name: Package
23+
# uses: hynek/build-and-inspect-python-package@v1
2424

2525
# Create a GitHub release
2626
release:

0 commit comments

Comments
 (0)