-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (72 loc) · 2.46 KB
/
deploy.yml
File metadata and controls
73 lines (72 loc) · 2.46 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
name: Deploy
run-name: "Create Release ${{ inputs.version }}"
on:
workflow_dispatch:
inputs:
version:
type: string
description: Version to deploy
required: true
jobs:
Deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: src/frontend/yarn.lock
- name: Install Frontend Dependencies
working-directory: src/frontend
run: yarn install
- name: Build Frontend
working-directory: src/frontend
run: yarn build
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Set Version
run: ./mvnw versions:set -DnewVersion=${{ inputs.version }} -DgenerateBackupPoms=false
- id: install-secret-key
name: Install gpg secret key
run: |
# Install gpg secret key
cat <(echo -e "${{ secrets.GPG_SIGNING_KEY }}") | gpg --batch --import
# Verify gpg secret key
gpg --list-secret-keys --keyid-format LONG
- name: Build Plugin
run: ./mvnw --batch-mode deploy -P build-release-documentation,build-executable-jar
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- name: Commit updated version
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Release ${{ inputs.version }}"
git push
- name: Release
uses: softprops/action-gh-release@v0.1.15
with:
tag_name: ${{ inputs.version }}
fail_on_unmatched_files: true
files: target/dependency-analyzer-${{ inputs.version }}*
- name: Set Version back to SNAPSHOT
run: ./mvnw versions:set -DnewVersion=${{ inputs.version }}-SNAPSHOT -DgenerateBackupPoms=false
- name: Commit updated version
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Set back to snapshot ${{ inputs.version }}"
git push