Skip to content

Commit 4dd1d42

Browse files
authored
Add workflow for release (ONLYOFFICE#22)
1 parent 2f29e06 commit 4dd1d42

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/release.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
### This workflow release plugin after tag was pushed ###
2+
name: Plugins release
3+
4+
on:
5+
workflow_call:
6+
push:
7+
tags:
8+
- "v*"
9+
10+
env:
11+
REPO_NAME: ${{ github.event.repository.name }}
12+
13+
jobs:
14+
build:
15+
name: Create Release
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
21+
- name: Get Tag Name
22+
id: tag_name
23+
run: |
24+
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
25+
26+
- name: Zip up files
27+
run: |
28+
PLUGIN=$(echo ${{ env.REPO_NAME }} | sed 's/plugin-//')
29+
zip -r $PLUGIN-${{ steps.tag_name.outputs.SOURCE_TAG }}.plugin . -x *.git*
30+
31+
- name: Release plugin
32+
uses: "marvinpinto/action-automatic-releases@latest"
33+
with:
34+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
35+
automatic_release_tag: "${{ steps.tag_name.outputs.SOURCE_TAG }}"
36+
title: "${{ steps.tag_name.outputs.SOURCE_TAG }}"
37+
prerelease: false
38+
files: "*.plugin"

0 commit comments

Comments
 (0)