Fix kradle GitHub Workflow. #3
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: Publish kradle executable. | |
on: | |
push: | |
env: | |
KLUTTER_PRIVATE_USERNAME: ${{ secrets.KLUTTER_PRIVATE_USERNAME }} | |
KLUTTER_PRIVATE_PASSWORD: ${{ secrets.KLUTTER_PRIVATE_PASSWORD }} | |
KLUTTER_PRIVATE_URL: ${{ secrets.KLUTTER_PRIVATE_URL }} | |
KLUTTER_JETBRAINS_CERTIFICATE_CHAINS: ${{ secrets.KLUTTER_JETBRAINS_CERTIFICATE_CHAINS }} | |
KLUTTER_JETBRAINS_PRIVATE_KEY: ${{ secrets.KLUTTER_JETBRAINS_PRIVATE_KEY }} | |
KLUTTER_JETBRAINS_PRIVATE_KEY_PASSWORD: ${{ secrets.KLUTTER_JETBRAINS_PRIVATE_KEY_PASSWORD }} | |
jobs: | |
archive-build-artifacts: | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
steps: | |
- name: 'checkout source' | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: 'install java' | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
cache: gradle | |
- name: 'build distribution' | |
uses: gradle/gradle-build-action@v2.4.2 | |
with: | |
gradle-version: 7.4.2 | |
arguments: clean build -p "lib/kradle" | |
- name: 'create kradle folder' | |
run: mkdir kradle | |
- name: 'create kradle folder' | |
run: mkdir kradle/lib | |
- name: 'copy jar to kradle folder' | |
run: cp ./lib/kradle/build/libs/kradle-wrapper.jar kradle | |
- name: 'copy kradlew to kradle folder' | |
run: cp ./lib/kradle/res/kradlew kradle/lib | |
- name: 'copy kradlew.bat to kradle folder' | |
run: cp ./lib/kradle/res/kradlew.bat kradle/lib | |
- uses: vimtor/action-zip@v1.1 | |
with: | |
files: kradle | |
recursive: true | |
dest: kradlew.zip | |
- name: 'upload kradle folder' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: kradlew | |
path: ${{ github.workspace }}/kradlew.zip |