-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
9 changed files
with
121 additions
and
26 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,104 @@ | ||
# .github/workflows/release.yml | ||
name: Release Rust CLI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
tags: | ||
- '*' | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_run: | ||
workflows: | ||
- Rust | ||
types: | ||
- completed | ||
workflow_run: | ||
workflows: | ||
- Rust | ||
types: | ||
- completed | ||
|
||
jobs: | ||
release: | ||
name: release ${{ matrix.target }} | ||
runs-on: ubuntu-latest | ||
build-and-release: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- target: x86_64-pc-windows-gnu | ||
- platform: windows | ||
rust_target: x86_64-pc-windows-gnu | ||
archive: zip | ||
- target: x86_64-unknown-linux-musl | ||
archive: tar.gz tar.xz tar.zst | ||
- target: x86_64-apple-darwin | ||
runs-on: ubuntu-latest | ||
- platform: linux-tar-gz | ||
rust_target: x86_64-unknown-linux-musl | ||
archive: tar.gz | ||
runs-on: ubuntu-latest | ||
- platform: linux-tar-xz | ||
rust_target: x86_64-unknown-linux-musl | ||
archive: tar.xz | ||
runs-on: ubuntu-latest | ||
- platform: linux-tar-zst | ||
rust_target: x86_64-unknown-linux-musl | ||
archive: tar.zst | ||
runs-on: ubuntu-latest | ||
- platform: macos | ||
rust_target: x86_64-apple-darwin | ||
archive: zip | ||
runs-on: macos-latest | ||
|
||
runs-on: ${{ matrix.runs-on }} | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- name: Compile and release | ||
uses: rust-build/[email protected] | ||
# Checkout the repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Install Rust | ||
- name: Install Rust | ||
run: | | ||
rustup install stable | ||
rustup target add ${{ matrix.rust_target }} | ||
# Build CLI tool | ||
- name: Build CLI tool | ||
run: | | ||
if [[ "${{ matrix.runs-on }}" == "macos-latest" ]]; then | ||
cd cli && cargo build --release --target=${{ matrix.rust_target }} | ||
else | ||
cargo install cross | ||
cd cli && cross build --release --target=${{ matrix.rust_target }} | ||
fi | ||
cd ../ && mkdir -p dist/${{ matrix.platform }} | ||
# Package the binary | ||
- name: Package Binary | ||
run: | | ||
BINARY=target/${{ matrix.rust_target }}/release/rocraters | ||
WIN_BINARY=target/${{ matrix.rust_target }}/release/rocraters.exe | ||
ARCHIVE=dist/${{ matrix.platform }}/rocraters-${{ matrix.rust_target }}.${{ matrix.archive }} | ||
if [[ "${{ matrix.archive }}" == "zip" ]]; then | ||
if [[ "${{ matrix.platform }}" == "windows" ]]; then | ||
zip -j $ARCHIVE $WIN_BINARY | ||
else | ||
zip -j $ARCHIVE $BINARY | ||
fi | ||
elif [[ "${{ matrix.archive }}" == "tar.gz" ]]; then | ||
tar -czvf $ARCHIVE -C target/${{ matrix.rust_target }}/release rocraters | ||
elif [[ "${{ matrix.archive }}" == "tar.xz" ]]; then | ||
tar -cJvf $ARCHIVE -C target/${{ matrix.rust_target }}/release rocraters | ||
elif [[ "${{ matrix.archive }}" == "tar.zst" ]]; then | ||
tar --zstd -cvf $ARCHIVE -C target/${{ matrix.rust_target }}/release rocraters | ||
fi | ||
# Upload artifacts | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: rocraters-${{ matrix.platform }}-${{ matrix.archive }} | ||
path: dist/${{ matrix.platform }}/* | ||
|
||
- name: Create GitHub Release | ||
if: github.ref_type == 'tag' | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: dist/${{ matrix.platform }}/* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
RUSTTARGET: ${{ matrix.target }} | ||
ARCHIVE_TYPES: ${{ matrix.archive }} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "ro-crate-rs" | ||
version = "0.4.6" | ||
version = "0.4.7" | ||
edition = "2021" | ||
repository = "https://github.com/intbio-ncl/ro-crate-rs" | ||
authors = ["Matt Burridge <[email protected]>"] | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "ro-crate-rs-cli" | ||
version = "0.4.5" | ||
version = "0.4.6" | ||
edition = "2021" | ||
repository = "https://github.com/intbio-ncl/ro-crate-rs" | ||
authors = ["Matt Burridge <[email protected]>"] | ||
|
@@ -13,7 +13,7 @@ categories = ["command-line-utilities"] | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
ro-crate-rs = {path = "../"} | ||
ro-crate-rs = {path = "../", version = "0.4.7"} | ||
clap = { version = "4.4.16", features = ["derive"] } | ||
chrono = "0.4" | ||
serde_json = "1.0" | ||
|
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
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "rocraters-python" | ||
version = "0.4.1" | ||
version = "0.4.2" | ||
edition = "2021" | ||
authors = ["Matt Burridge <[email protected]>"] | ||
description = "Lightweight Python library for RO-Crate manipulation implemented in Rust" | ||
|