убрала лишние правки #43
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| |
on: | |
push: | |
paths-ignore: | |
- "**/*.md" | |
env: | |
JCP_VERSION: 2.0.40450-A | |
JCP_FILENAME_PREFIX: jcp- | |
DIADOC_SIGNING_SECRET: ${{ secrets.DIADOC_SIGNING_SECRET }} | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Maven Action | |
uses: s4u/setup-maven-action@v1.14.0 | |
with: | |
java-version: 17 | |
maven-version: 3.9.8 | |
- name: Decrypt and Extract JCP Archive | |
run: | | |
openssl enc -d -aes-256-cbc \ | |
-in ./${{ env.JCP_FILENAME_PREFIX }}${{ env.JCP_VERSION }}.zip.enc \ | |
-out ./${{ env.JCP_FILENAME_PREFIX }}${{ env.JCP_VERSION }}.zip \ | |
-pass env:DIADOC_SIGNING_SECRET | |
unzip -o ./${{ env.JCP_FILENAME_PREFIX }}${{ env.JCP_VERSION }}.zip | |
- name: Install JCP Dependencies | |
run: | | |
jars=( | |
"JCP.jar ru.cryptopro jcp" | |
"asn1rt.jar com.objsys.asn1j asn1rt" | |
"ASN1P.jar ru.cryptopro asn1p" | |
"JCryptoP.jar ru.cryptopro jcryptop" | |
) | |
for jar in "${jars[@]}"; do | |
set -- $jar | |
mvn install:install-file \ | |
-Dfile=./${{ env.JCP_FILENAME_PREFIX }}${{ env.JCP_VERSION }}/$1 \ | |
-DgroupId=$2 \ | |
-DartifactId=$3 \ | |
-Dversion=${{ env.JCP_VERSION }} \ | |
-Dpackaging=jar | |
done | |
- name: Run the build script | |
run: mvn package | |
env: | |
github_ref_type: ${{ github.ref_type }} | |
- 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: 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 |