-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (56 loc) · 1.5 KB
/
create-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
name: Create release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version. ex)1.0.0, 1.0.0-SNAPSHOT'
required: true
env:
TAG_NAME: v${{ github.event.inputs.version }}
jobs:
create_tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Git config
run: |
git config --local user.name github-actions
git config --local user.email ${{ secrets.EMAIL }}
- name: Create tag
run: |
git tag ${TAG_NAME}
git push origin ${TAG_NAME}
create_release:
needs: create_tag
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: ${{ env.TAG_NAME }}
tag_name: ${{ env.TAG_NAME }}
draft: false
publish_package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Deoloy package
run: mvn -B deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}