Skip to content

Merge pull request #116 from emqx/update-5-1-0 #17

Merge pull request #116 from emqx/update-5-1-0

Merge pull request #116 from emqx/update-5-1-0 #17

Workflow file for this run

name: build release
on:
push:
tags:
- "*"
jobs:
build_release:
runs-on: ubuntu-latest
container:
image: "ghcr.io/emqx/emqx-builder/5.0-14:1.13.3-24.2.1-1-ubuntu20.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=1.0.0-rebar3-template-test
./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 }}