Add workflow for release (#22)

This commit is contained in:
Danil Titarenko
2022-06-02 10:20:15 +03:00
committed by GitHub
parent 2f29e06347
commit 4dd1d42772

38
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,38 @@
### This workflow release plugin after tag was pushed ###
name: Plugins release
on:
workflow_call:
push:
tags:
- "v*"
env:
REPO_NAME: ${{ github.event.repository.name }}
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get Tag Name
id: tag_name
run: |
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Zip up files
run: |
PLUGIN=$(echo ${{ env.REPO_NAME }} | sed 's/plugin-//')
zip -r $PLUGIN-${{ steps.tag_name.outputs.SOURCE_TAG }}.plugin . -x *.git*
- name: Release plugin
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ steps.tag_name.outputs.SOURCE_TAG }}"
title: "${{ steps.tag_name.outputs.SOURCE_TAG }}"
prerelease: false
files: "*.plugin"