-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.35 KB
/
build-release.yml
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
49
50
51
52
53
54
55
56
57
58
name: Build and Release Plugin
on:
push:
tags:
- 'v*'
branches:
- master
pull_request:
branches:
- master
env:
PLUGIN_NAME: "BibiReader"
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get tag name
if: startswith( github.ref, 'refs/tags/')
id: get_tag_name
run: |
echo ::set-output name=TAGNAME::${GITHUB_REF/refs\/tags\//}
echo "GITHUB_TAGNAME=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Build Plugin
run: python ./buildplugin
- name: Upload Artifact
if: "contains(github.event.head_commit.message, '[deploy]')"
uses: actions/upload-artifact@v4
with:
name: unzip_me
path: ./*.zip
retention-days: 3
- name: Create Release
if: startswith( github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: $PLUGIN_NAME ${{ steps.get_tag_name.outputs.TAGNAME }} Released
body: |
Changes in this Release
- First Change
- Second Change
draft: true
prerelease: false
artifacts: './*.zip'