-
Notifications
You must be signed in to change notification settings - Fork 10
48 lines (42 loc) · 1.41 KB
/
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
name: Release
on:
push:
tags:
- '*.*.*'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Fetch sources
uses: actions/checkout@v2
- name: Setup JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: |
~/.m2/repository
~/.m2/wrapper
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Configure build metadata
id: metadata
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//}
- name: Build plugin
env:
TEST_SNYK_TOKEN: ${{ secrets.TEST_SNYK_TOKEN }}
TEST_SNYK_ORG: ${{ secrets.TEST_SNYK_ORG }}
run: |
./mvnw clean verify --show-version --batch-mode --no-transfer-progress --errors -Drevision=${{ steps.metadata.outputs.tag }}
cd ${GITHUB_WORKSPACE}/distribution/target
sha256sum artifactory-snyk-security-plugin-${{ steps.metadata.outputs.tag }}.zip > artifactory-snyk-security-plugin-${{ steps.metadata.outputs.tag }}.zip.sha256
- name: Create GitHub release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
files: distribution/target/*