Sign jar from the gradle task instead of the CI #159
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
name: Create GitHub release(s) | |
on: | |
push: | |
branches: [ master ] | |
tags: 'v*' | |
jobs: | |
build-and-release: | |
if: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref != 'ref/heads/master' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build release shadow jar with Gradle | |
run: ./gradlew -Penv=release shadowJar -x test | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
- name: Build dev shadow jar with Gradle | |
env: | |
DELTACV_PLUGINSIGNING_PRIVATE: ${{ secrets.DELTACV_PLUGINSIGNING_PRIVATE }} | |
run: | | |
SHA_SHORT="$(git rev-parse --short HEAD)" | |
./gradlew -Phash=$SHA_SHORT shadowJar -x test | |
if: ${{ !startsWith(github.ref, 'refs/tags/v') }} | |
- uses: pyTooling/Actions/releaser@r0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: 'Dev' | |
rm: true | |
files: | | |
EOCVSimPlugin/build/libs/*.jar | |
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/v')}} | |
- uses: softprops/action-gh-release@v2 | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: 'EOCVSimPlugin/build/libs/*.jar' |