diff --git a/.github/workflows/main-build.yml b/.github/workflows/main-build.yml index f91b8a9..9696415 100644 --- a/.github/workflows/main-build.yml +++ b/.github/workflows/main-build.yml @@ -13,26 +13,38 @@ jobs: java-version: 11 - name: Setup Gradle uses: gradle/gradle-build-action@v2 - - name: Execute Gradle build - run: ./gradlew -Pversion=${{github.ref_name}} build zipModule - - name: Upload artifacts + - name: Deserialize signing certs + run: | + echo ${{ secrets.CERT_BASE64 }} | base64 --decode > cert.p7b + echo ${{ secrets.KEYSTORE_BASE64 }} | base64 --decode > keystore.pfx + - name: Build & create signed module + run: > + ./gradlew + -Pversion=${{github.ref_name}} + -PsignModule=true + build + signModule + --certFile=cert.p7b + --certPassword="${{ secrets.CERT_PASSWORD }}" + --keystoreFile=keystore.pfx + --keystorePassword="${{ secrets.KEYSTORE_PASSWORD }}" + --certAlias=ignition-extensions + - name: Upload signed module uses: actions/upload-artifact@v3 with: - name: unsigned - path: build/*.unsigned.modl + name: signed + path: build/Ignition-Extensions.modl release: runs-on: ubuntu-latest needs: [build] steps: - uses: actions/checkout@v2 - - name: Download Unsigned Module + - name: Download signed module uses: actions/download-artifact@v3 with: - name: unsigned + name: signed path: artifacts - - name: Display structure of downloaded files - run: ls -R - - name: Create Release + - name: Create release uses: marvinpinto/action-automatic-releases@latest with: repo_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index 6729f9a..ad21cd5 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -1,7 +1,7 @@ name: Run Gradle on PRs on: pull_request jobs: - gradle: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -12,5 +12,5 @@ jobs: uses: gradle/gradle-build-action@v2 with: cache-read-only: ${{ github.ref != 'refs/heads/main' }} - - name: Execute Gradle build - run: ./gradlew build zipModule + - name: Build + run: ./gradlew build diff --git a/LICENSE.md b/LICENSE.md index 5fe322a..4c2be71 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Paul Griffith +Copyright (c) 2022 Ignition Module Development Community Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 577a09a..12df72f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ have enough footguns) to go into Ignition itself. # Usage Simply download the .modl file from the [latest release](https://github.com/IgnitionModuleDevelopmentCommunity/ignition-extensions/releases) and install it to your gateway. -Note: At present, the module is not signed, so you will need to allow unsigned modules to install. # Building diff --git a/build.gradle.kts b/build.gradle.kts index 0863a00..5f48818 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -36,5 +36,5 @@ ignitionModule { ), ) - skipModlSigning.set(true) // TODO signing + skipModlSigning.set(!findProperty("signModule").toString().toBoolean()) }