-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (41 loc) · 1.29 KB
/
Copy pathrelease.yml
File metadata and controls
48 lines (41 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Release
run-name: Patch and release
on: workflow_dispatch
permissions:
contents: write
env:
RELEASE_FILE: umami-sqlite.zip
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
path: repository
- name: Get Umami version
working-directory: repository
run: echo "UMAMI_VERSION=v$(cat VERSION)" >> $GITHUB_ENV
- name: Download Umami
run: |
wget https://github.com/umami-software/umami/archive/refs/tags/$UMAMI_VERSION.zip
unzip -q $UMAMI_VERSION.zip
- name: Prepare and zip
run: |
UMAMI_FOLDER=$(ls -d umami-*)
cd $UMAMI_FOLDER
rm -rf ./db ./prisma
rsync -a ../repository/create/ ./
cp ../repository/examples/docker-compose.yml ./
git apply ../repository/patches/*.patch
cd ..
zip -q -r $RELEASE_FILE $UMAMI_FOLDER
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create $UMAMI_VERSION $RELEASE_FILE \
--title "$UMAMI_VERSION" \
--notes "https://github.com/umami-software/umami/releases/tag/$UMAMI_VERSION" \
--draft \
--repo $GITHUB_REPOSITORY