Skip to content

[#8] gh actions to release #27

[#8] gh actions to release

[#8] gh actions to release #27

Workflow file for this run

name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
PROJECT_NAME: gitnote
CARGO_TERM_COLOR: always
jobs:
build:
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 }}
collect:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: ./gitnote-jetbrains/src/main/resources/core
- name: list resources
run: ls -lR ./gitnote-jetbrains/src/main/resources/core/
- name: Build JAR
working-directory: ./gitnote-jetbrains
run: ./gradlew buildPlugin -Dgitnote.phase=2