Skip to content

chore: set ci false on script #19

chore: set ci false on script

chore: set ci false on script #19

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
pull_request:
branches: [ "master" ]
env:
PROJECT_NAME: gitnote
CARGO_TERM_COLOR: always
jobs:
buildCargo:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- name: linux-amd64
runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
libName: libgitnote.so
- name: win-amd64
runner: windows-latest
target: x86_64-pc-windows-msvc
libName: gitnote.dll
- name: macos-amd64
runner: macos-latest
target: x86_64-apple-darwin
libName: libgitnote.dylib
- name: macos-arm64
runner: macos-latest
target: aarch64-apple-darwin
libName: libgitnote.dylib
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build Binary
working-directory: ./gitnote-core
run: cargo build --lib --verbose --locked --release --target ${{ matrix.target }}
- name: Run tests
working-directory: ./gitnote-core
run: cargo test --lib --verbose
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: ./gitnote-core/target/${{ matrix.target }}/release/${{ matrix.libName }}
buildJar:
runs-on: ubuntu-latest
needs: buildCargo
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: ./gitnote-jetbrains/src/main/resources/core
- name: Build JAR
working-directory: ./gitnote-jetbrains
run: ./gradlew buildPlugin -Dgitnote.useLocalGui=false -Dgitnote.buildCore=false
- name: Get Project Version
id: get_version
working-directory: ./gitnote-jetbrains
run: echo "GITNOTE_VERSION=$(./gradlew properties -q | awk '/^version:/ {print $2}')" >> $GITHUB_ENV
- name: Upload
uses: actions/upload-artifact@v4
with:
name: gitnote-jetbrains-${{ env.GITNOTE_VERSION }}.zip
path: ./gitnote-jetbrains/build/distributions/gitnote-jetbrains-${{ env.GITNOTE_VERSION }}.zip
release:
permissions:
contents: write
runs-on: ubuntu-latest
needs: [ buildCargo, buildJar ]
if: github.event_name == 'push'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get Project Version
id: get_version
working-directory: ./gitnote-jetbrains
run: echo "GITNOTE_VERSION=$(./gradlew properties -q | awk '/^version:/ {print $2}')" >> $GITHUB_ENV
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: gitnote-jetbrains-${{ env.GITNOTE_VERSION }}.zip
- name: Release
uses: softprops/action-gh-release@v2
with:
files: gitnote-jetbrains-${{ env.GITNOTE_VERSION }}.zip