-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (78 loc) · 2.68 KB
/
pluginapi_release.yml
File metadata and controls
90 lines (78 loc) · 2.68 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: plugin-api release
on:
workflow_dispatch:
inputs:
tags:
description: 'Tag: Plugin-Api Version'
required: true
previousTag:
description: 'Tag: Previous Tag used for release note generation'
default: "auto"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout SeqsLab Plugin API Code
uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Update apt-get
run: sudo apt-get update
- name: Install GnuPG
run: sudo apt-get -y install gpg
- name: Import GPG
uses: crazy-max/ghaction-import-gpg@v5.1.0
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v20
with:
servers: >
[
{
"id": "github",
"username": "LIN-Yu-Ting",
"password": "${{ secrets.GITHUB_TOKEN }}"
},
{
"id": "gpg.passphrase",
"passphrase": "${{ secrets.GPG_PASSPHRASE }}"
}
]
- name: Show Maven Version
run: |
mvn -version
- name: Build with Maven
run: |
mvn versions:set -DnewVersion=${{ github.event.inputs.tags }}
mvn clean deploy -P github
- name: Create Changelog and Release
id: create_changelog_release
run: |
gh release create ${{ github.event.inputs.tags }} --notes-start-tag ${{ github.event.inputs.previousTag }} --generate-notes --target $(git branch --show-current)
gh release view ${{ github.event.inputs.tags }} --json body -q .body > CHANGELOG.md
echo 'CHANGELOG<<EOF' >> $GITHUB_ENV
cat CHANGELOG.md >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update Release Note
run: |
gh release edit ${{ github.event.inputs.tags }} --notes "${{env.CHANGELOG}}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- name: Slack Notification
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: tests
SLACK_COLOR: '#3278BD'
SLACK_MESSAGE: 'Test fails after commit pushed please check with links above.'
SLACK_TITLE: Test Failure
SLACK_USERNAME: Github Action
SLACK_MSG_AUTHOR: $GITHUB_ACTOR