Update ci_cd.yaml #49
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: ci | |
on: | |
push: | |
branches: | |
- main | |
env: | |
VERSION: 1.5.0 | |
EXT_VERSION: 1.2 | |
NAME: BitKip | |
jobs: | |
build-windows: | |
runs-on: [ windows-latest ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 21 | |
distribution: 'oracle' | |
gpg-private-key: ${{ secrets.GPG_KEY }} | |
gpg-passphrase: PASSPHRASE | |
- name: Create nsis installer | |
uses: joncloud/makensis-action@publish | |
with: | |
additional-plugin-paths: ${{ github.workspace }}/NSIS_Plugins/Plugins | |
- name: Print NSIS version | |
run: makensis -VERSION | |
- name: Build using script | |
run: .\builders\windows.bat | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-build | |
path: .\build\releases | |
build-linux: | |
runs-on: [ ubuntu-latest ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 21 | |
distribution: 'oracle' | |
gpg-private-key: ${{ secrets.GPG_KEY }} | |
gpg-passphrase: PASSPHRASE | |
- name: Install makeself | |
run: sudo apt-get install makeself | |
- name: Make script executable | |
run: chmod +x ./builders/linux.sh | |
- name: Make gradlew executable | |
run: chmod +x ./gradlew | |
- name: Build using script | |
run: ./builders/linux.sh | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-build | |
path: ./build/releases | |
package-extension: | |
runs-on: [ ubuntu-latest ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Make script executable | |
run: chmod +x ./builders/package_extension.sh | |
- name: packaging extension | |
run: ./builders/package_extension.sh | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: extension-package | |
path: ./build/releases | |
release-artifacts: | |
runs-on: [ ubuntu-latest ] | |
needs: [ build-windows, build-linux, package-extension ] | |
steps: | |
- name: Download Windows Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: windows-build | |
- name: Download Linux Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: linux-build | |
- name: Download Extension Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: extension-package | |
- name: tree | |
run: tree . | |
- name: Release Artifacts | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.RELEASE_TOKEN }} | |
automatic_release_tag: "v${{ env.VERSION }}" | |
prerelease: false | |
draft: true | |
title: "v${{ env.VERSION }}" | |
files: | | |
./** |