-
Notifications
You must be signed in to change notification settings - Fork 47
96 lines (83 loc) · 3.05 KB
/
actions.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
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
91
92
93
94
95
96
on:
push:
paths-ignore:
- "**/*.md"
env:
JCP_VERSION: 2.0.40450-A
JCP_FILENAME_PREFIX: jcp-
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.x
- name: Setup Maven Action
uses: s4u/setup-maven-action@v1.14.0
with:
java-version: 17
maven-version: 3.9.8
- name: Setup NuGet.exe
uses: nuget/setup-nuget@v2
with:
nuget-version: '5.x'
- run: nuget install secure-file -ExcludeVersion
- run: ./secure-file/tools/secure-file.exe -decrypt ${{ env.JCP_FILENAME_PREFIX }}${{ env.JCP_VERSION }}.zip.enc -secret ${{ secrets.DIADOC_SIGNING_SECRET }}
- name: Extract JCP from ZIP
uses: ihiroky/extract-action@v1
with:
file_path: ./${{ env.JCP_FILENAME_PREFIX }}${{ env.JCP_VERSION }}.zip
- run: mvn install:install-file -Dfile="JCP.jar" -DgroupId="ru.CryptoPro" -DartifactId="JCP" -Dversion="${{ env.JCP_VERSION }}" -Dpackaging="jar"
working-directory: ./${{ env.JCP_FILENAME_PREFIX }}${{ env.JCP_VERSION }}
- run: mvn install:install-file -Dfile="asn1rt.jar" -DgroupId="com.objsys.asn1j" -DartifactId="asn1rt" -Dversion="${{ env.JCP_VERSION }}" -Dpackaging="jar"
working-directory: ./${{ env.JCP_FILENAME_PREFIX }}${{ env.JCP_VERSION }}
- run: mvn install:install-file -Dfile="ASN1P.jar" -DgroupId="ru.CryptoPro" -DartifactId="ASN1P" -Dversion="${{ env.JCP_VERSION }}" -Dpackaging="jar"
working-directory: ./${{ env.JCP_FILENAME_PREFIX }}${{ env.JCP_VERSION }}
- run: mvn install:install-file -Dfile="JCryptoP.jar" -DgroupId="ru.CryptoPro" -DartifactId="JCryptoP" -Dversion="${{ env.JCP_VERSION }}" -Dpackaging="jar"
working-directory: ./${{ env.JCP_FILENAME_PREFIX }}${{ env.JCP_VERSION }}
- name: Run the build script
uses: cake-build/cake-action@v2
env:
github_ref_type: ${{ github.ref_type }}
with:
target: Default
arguments: |
configuration: Release
verbosity: Diagnostic
cake-version: 1.3.0
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: packages
path: |
target/*.jar
if-no-files-found: error
publish:
runs-on: ubuntu-22.04
needs: build
if: startsWith(github.event.ref, 'refs/tags/version')
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.x
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: packages
- name: Create github release
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
draft: false
prerelease: false
files: |
**/*.jar