-
Notifications
You must be signed in to change notification settings - Fork 71
58 lines (54 loc) · 1.6 KB
/
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 release
on:
push:
tags:
- "*"
jobs:
build_release:
runs-on: ubuntu-latest
container:
image: ghcr.io/emqx/emqx-builder/5.3-2:1.15.7-26.2.1-2-ubuntu22.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: build release
if: startsWith(github.ref, 'refs/tags/')
run: |
git config --global --add safe.directory "$(pwd)"
mkdir -p ~/.config/rebar3/templates
cp -r . ~/.config/rebar3/templates
rebar3 new emqx-plugin my_emqx_plugin version=5.1.0
./check-vsn.sh my_emqx_plugin
make -C my_emqx_plugin rel
- uses: actions/upload-artifact@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: packages
path: |
my_emqx_plugin/_build/default/emqx_plugrel/*.tar.gz
release:
runs-on: ubuntu-latest
needs:
- build_release
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v2
with:
name: packages
path: packages
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: EMQX5 Example Plugin ${{ github.ref }} Released
body: EMQX5 Example Plugin ${{ github.ref }} Released
draft: false
prerelease: false
- uses: Rory-Z/upload-release-asset@v1
with:
repo: emqx-plugin-template
path: "packages/*"
token: ${{ github.token }}