Skip to content

Commit 7197686

Browse files
chore/publish attempt #3 (#18)
* Makefile expects to be running inside a Repl, sidestep that * Update release-drafter triggers - master -> main - Add the abiliy to manually run * Permit manually triggering release flow
1 parent 90218dc commit 7197686

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/python-publish.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ name: Upload Python Package
66
on:
77
release:
88
types: [published]
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: 'What version to use for the release'
13+
required: true
914

1015
jobs:
1116
deploy:
@@ -27,14 +32,18 @@ jobs:
2732
2833
- name: Set release version
2934
run: |
30-
tag="${GITHUB_REF_NAME}"
35+
tag="${{ github.event.inputs.version }}"
36+
if [ -z "$tag" ]; then
37+
tag="${GITHUB_REF_NAME}"
38+
fi
3139
version="${tag#v}" # Strip leading v
3240
3341
# Bump poetry tag
3442
poetry version "$version"
3543
3644
- name: Build and publish
3745
run: |
46+
poetry build
3847
TWINE_USERNAME=__token__ \
3948
TWINE_PASSWORD="${{ secrets.PYPI_TOKEN }}" \
40-
make release
49+
poetry run twine upload dist/*

.github/workflows/release-drafter.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: Release Drafter
22

33
on:
4+
workflow_dispatch: {}
45
push:
56
# branches to consider in the event; optional, defaults to all
67
branches:
7-
- master
8+
- main
89
# pull_request event is required only for autolabeler
910
pull_request:
1011
# Only following types are handled by the action, but one can default to all as well

0 commit comments

Comments
 (0)