Added release CI build
This commit is contained in:
parent
9e0052ef0d
commit
df684a0a94
145
.github/workflows/release.yml
vendored
145
.github/workflows/release.yml
vendored
@ -1,57 +1,19 @@
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
|
||||
|
||||
name: Release Build
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
build_windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- uses: actions-rs/cargo@v1
|
||||
name: Rust build
|
||||
with:
|
||||
command: build
|
||||
args: --manifest-path=./rs/Cargo.toml --release --features=uniffi/cli
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'corretto'
|
||||
architecture: x64
|
||||
- name: Build with Gradle
|
||||
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
|
||||
with:
|
||||
arguments: createDistributable
|
||||
|
||||
build_linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions-rs/toolchain@v1
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: stable
|
||||
- uses: actions-rs/cargo@v1
|
||||
name: Rust build
|
||||
with:
|
||||
command: build
|
||||
args: --manifest-path=./rs/Cargo.toml --release --features=uniffi/cli
|
||||
toolchain: nightly
|
||||
- run: cargo install cargo-kotars --git https://github.com/JetpackDuba/kotars
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
@ -62,3 +24,102 @@ jobs:
|
||||
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
|
||||
with:
|
||||
arguments: fatJarLinux
|
||||
- name: Generate SHA256 Checksum
|
||||
working-directory: ./build/libs
|
||||
run: find . -type f -exec bash -c "sha256sum {} > {}.sum " \;
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
body: "Beta release"
|
||||
prerelease: true
|
||||
repository: JetpackDuba/GitnuroTests
|
||||
with:
|
||||
files: |
|
||||
build/libs/Gitnuro-linux-x86_64-*.jar
|
||||
build/libs/Gitnuro-linux-x86_64-*.jar.sum
|
||||
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
|
||||
build_windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Print Tag
|
||||
run: echo ${{github.ref_name}}
|
||||
- uses: actions/checkout@v3
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: nightly
|
||||
- run: cargo install cargo-kotars --git https://github.com/JetpackDuba/kotars
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'corretto'
|
||||
architecture: x64
|
||||
- name: Build with Gradle
|
||||
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
|
||||
with:
|
||||
arguments: createDistributable
|
||||
- name: Compile .ISS to .EXE Installer
|
||||
uses: Minionguyjpro/Inno-Setup-Action@v1.2.2
|
||||
with:
|
||||
path: gitnuro.iss
|
||||
options: /O+ /DMyAppVersion="${{github.ref_name}}"
|
||||
- name: Windows portable ZIP
|
||||
run: Compress-Archive -Path build/compose/binaries/main/app/Gitnuro/* -Destination Output/Gitnuro_Windows_Portable_${{github.ref_name}}.zip
|
||||
- name: Generate SHA256 Checksum
|
||||
shell: bash
|
||||
working-directory: ./Output/
|
||||
run: find -type f -exec bash -c "sha256sum {} > {}.sum " \;
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
body: "Beta release"
|
||||
prerelease: true
|
||||
repository: JetpackDuba/GitnuroTests
|
||||
with:
|
||||
files: |
|
||||
Output/Gitnuro*.exe
|
||||
Output/Gitnuro*.sum
|
||||
Output/Gitnuro*.zip
|
||||
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
|
||||
build_macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: nightly
|
||||
- run: cargo install cargo-kotars --git https://github.com/JetpackDuba/kotars
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'corretto'
|
||||
architecture: x64
|
||||
- name: Build with Gradle
|
||||
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
|
||||
with:
|
||||
arguments: createDistributable
|
||||
- name: Create output directory
|
||||
run: mkdir Output
|
||||
- name: MacOS DMG
|
||||
working-directory: build/compose/binaries/main/app/
|
||||
run: zip -r ../../../../../Output/Gitnuro_macos_${{github.ref_name}}.zip .
|
||||
- name: Generate SHA256 Checksum
|
||||
working-directory: ./Output/
|
||||
run: find . -type f -exec bash -c "shasum -a 256 {} > {}.sum " \;
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
body: "Beta release"
|
||||
prerelease: true
|
||||
repository: JetpackDuba/GitnuroTests
|
||||
with:
|
||||
files: |
|
||||
Output/Gitnuro*.zip
|
||||
Output/Gitnuro*.sum
|
||||
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
Loading…
Reference in New Issue
Block a user