aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/wee-slack.yml9
-rwxr-xr-xbuild.sh2
2 files changed, 10 insertions, 1 deletions
diff --git a/.github/workflows/wee-slack.yml b/.github/workflows/wee-slack.yml
index ce6080a..7decad2 100644
--- a/.github/workflows/wee-slack.yml
+++ b/.github/workflows/wee-slack.yml
@@ -2,7 +2,7 @@ name: wee-slack
on: [push, pull_request]
jobs:
- test:
+ build:
if: >
github.event_name == 'push' || (
github.event_name == 'pull_request' &&
@@ -30,3 +30,10 @@ jobs:
- run: poetry run pyright --pythonversion 3.7 main.py slack tests typings
- run: poetry run pytest tests
+
+ - run: ./build.sh
+
+ - uses: actions/upload-artifact@v3
+ with:
+ name: slack.py
+ path: build/slack.py
diff --git a/build.sh b/build.sh
index 0a9acae..e26e543 100755
--- a/build.sh
+++ b/build.sh
@@ -2,6 +2,8 @@
shopt -s extglob
+mkdir -p build
+
contents="$(cat slack/python_compatibility.py slack/util.py slack/task.py slack/slack_message.py slack/!(python_compatibility|util|task|slack_message).py main.py | \
perl -0777 -pe 's/^( *from [^(\n]+\([^)]+\))/$1=~s|\n+||gr/mge' | \
grep -Ev '^from slack[. ]')"