Skip to content
This repository was archived by the owner on Oct 13, 2025. It is now read-only.

Commit 076afe4

Browse files
committed
Merge branch 'main' of https://github.com/andrey18106/mediadc into dev
2 parents 1528f46 + 6f7b07f commit 076afe4

File tree

2 files changed

+24
-28
lines changed

2 files changed

+24
-28
lines changed
Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
1-
name: Build, Release
1+
name: Create Release
22

33
on:
4-
pull_request:
5-
branches: [main]
6-
types: [closed]
7-
tags:
8-
- v*
4+
workflow_dispatch:
95

106
env:
117
APP_NAME: mediadc
128

139
jobs:
1410
build_app:
1511
runs-on: ubuntu-latest
16-
if: startsWith(github.ref, 'refs/tags/v') && github.event.pull_request.merged == true
17-
name: Build and package app
12+
name: Build and create release
1813

1914
steps:
2015
- name: Checkout
2116
uses: actions/checkout@v2
2217

18+
- name: Archive Source
19+
uses: thedoctor0/zip-release@master
20+
with:
21+
type: 'zip'
22+
filename: 'Sources.zip'
23+
exclusions: '*.git*'
24+
2325
- name: Setup Node
2426
uses: actions/setup-node@v2
2527
with:
@@ -28,6 +30,14 @@ jobs:
2830
- name: Build
2931
run: make
3032

33+
- name: Get names
34+
id: get_version
35+
run: |
36+
APP_VERSION=$(sed -n "s/<version>\(.*\)<\/version>/\\1/p" ./appinfo/info.xml | tr -d '\t')
37+
echo $APP_VERSION
38+
echo "::set-output name=version::v${APP_VERSION}"
39+
echo "::set-output name=tag::v${APP_VERSION}"
40+
3141
- name: Install Krankerl
3242
run: |
3343
wget https://github.com/ChristophWurst/krankerl/releases/download/v0.13.0/krankerl_0.13.0_amd64.deb
@@ -42,27 +52,13 @@ jobs:
4252
path: build/artifacts/${{ env.APP_NAME }}.tar.gz
4353
if-no-files-found: error
4454

45-
create_release:
46-
runs-on: ubuntu-latest
47-
if: startsWith(github.ref, 'refs/tags/v') && github.event.pull_request.merged == true
48-
name: Build and package app
49-
needs: [build_app]
50-
51-
steps:
52-
- name: Collect app build
53-
uses: actions/download-artifact@v2
54-
with:
55-
name: tarball
56-
57-
- name: Get release name
58-
id: get_version
59-
run: |
60-
echo "::set-output name=version::${GITHUB_REF##refs/tags/v}"
61-
62-
- name: Upload app to release
55+
- name: Create release draft
6356
uses: ncipollo/[email protected]
6457
with:
6558
name: ${{ steps.get_version.outputs.version }}
59+
tag: ${{ steps.get_version.outputs.tag }}
60+
commit: ${{ github.ref }}
6661
draft: true
67-
artifacts: tarball
62+
artifacts: "build/artifacts/${{ env.APP_NAME }}.tar.gz,Sources.zip"
6863
token: ${{ secrets.GITHUB_TOKEN }}
64+
artifactErrorsFailBuild: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Nextcloud MediaDC
22

3-
![build](https://github.com/andrey18106/mediadc/actions/workflows/build.yml/badge.svg)
3+
![build](https://github.com/andrey18106/mediadc/actions/workflows/create-release-draft.yml/badge.svg)
44
![static-analysis](https://github.com/andrey18106/mediadc/actions/workflows/static-analysis.yml/badge.svg)
55

66
**📸📹 Collect photo and video duplicates to save your cloud storage space**

0 commit comments

Comments
 (0)