Skip to content

Commit 9ee2f68

Browse files
committed
feat: build release on tag push
1 parent 44e7156 commit 9ee2f68

File tree

2 files changed

+58
-31
lines changed

2 files changed

+58
-31
lines changed

.github/workflows/ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
tags:
7+
- '*'
8+
pull_request:
9+
branches: [ "main" ]
10+
workflow_dispatch:
11+
12+
jobs:
13+
test:
14+
name: Run tests
15+
runs-on: ubuntu-24.04
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup Erlang
21+
uses: erlef/setup-beam@v1
22+
with:
23+
otp-version: "26"
24+
rebar3-version: "3"
25+
26+
- name: Start Dependencies
27+
run: make up
28+
29+
- name: Run Tests
30+
run: make ct
31+
32+
- name: Cleanup
33+
if: always()
34+
run: make down
35+
36+
release:
37+
name: Publish release
38+
needs: test
39+
if: startsWith(github.ref, 'refs/tags/')
40+
runs-on: ubuntu-24.04
41+
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- name: Setup Erlang
46+
uses: erlef/setup-beam@v1
47+
with:
48+
otp-version: "26"
49+
rebar3-version: "3"
50+
51+
- name: Build Release
52+
run: make rel
53+
54+
- name: Create Release
55+
uses: softprops/action-gh-release@v1
56+
with:
57+
files: _build/default/emqx_plugrel/emqx_offline_message_plugin-*.tar.gz
58+
generate_release_notes: true

.github/workflows/run_tests.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)