Skip to content

Commit 3a5fa6f

Browse files
committed
Add GitHub Actions workflow for automated releases
1 parent 5014153 commit 3a5fa6f

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release Alfred Workflow
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: macos-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python 3
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.x'
21+
22+
- name: Install dependencies into lib/
23+
run: pip3 install --target ./lib -r requirements.txt
24+
25+
- name: Build .alfredworkflow
26+
run: |
27+
# .alfredworkflow is a zip of the workflow directory
28+
# Exclude CI files, git files, and dev artifacts
29+
zip -r "Upload-Screenshot-to-R2.alfredworkflow" . \
30+
-x ".git/*" \
31+
-x ".github/*" \
32+
-x ".gitignore" \
33+
-x "requirements.txt" \
34+
-x "*.pyc" \
35+
-x "__pycache__/*" \
36+
-x "lib/**/__pycache__/*" \
37+
-x "lib/**/*.dist-info/*"
38+
39+
- name: Create GitHub Release
40+
uses: softprops/action-gh-release@v2
41+
with:
42+
files: Upload-Screenshot-to-R2.alfredworkflow
43+
generate_release_notes: true

0 commit comments

Comments
 (0)