Skip to content

Commit 774e0f9

Browse files
author
dushixiang
committed
提交自动发版GitHub Action
1 parent 0f52035 commit 774e0f9

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/kafka-map.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: KafkaMap Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "v*"
8+
9+
jobs:
10+
kafka-map-build:
11+
name: KafkaMap Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Get version
15+
id: get_version
16+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
17+
- name: Private Actions Checkout
18+
uses: actions/checkout@v2.3.4
19+
- name: node Setup
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: '16'
23+
- name: npm install
24+
run: |
25+
cd web
26+
npm install --global yarn
27+
yarn
28+
- uses: actions/setup-java@v3
29+
with:
30+
distribution: 'temurin'
31+
java-version: '17'
32+
cache: 'maven'
33+
- name: Build with Maven
34+
run: |
35+
sh build.sh
36+
mkdir kafka-map
37+
cp target/kafka-map*.jar kafka-map/kafka-map.jar
38+
cp src/main/resources/application.yml kafka-map/application.yml
39+
tar zcvf kafka-map.tar.gz kafka-map/
40+
- name: release
41+
uses: softprops/action-gh-release@v1
42+
with:
43+
files: kafka-map.tar.gz
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)