Skip to content

Commit

Permalink
ci: Add updated workflows & buld script dep
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDwarf7 committed Jan 20, 2025
1 parent efbc5e1 commit c27e595
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
PROJECT_NAME: "NAME_HERE"
PROJECT_NAME: REPLACE_NAME_HERE
jobs:
check:
name: "Build - check"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
PROJECT_NAME: "NAME_HERE"
PROJECT_NAME: REPLACE_NAME_HERE
jobs:
docs:
name: "Docs - docs"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
PROJECT_NAME: "NAME_HERE"
PROJECT_NAME: REPLACE_NAME_HERE
jobs:
build-unix:
name: "Draft - build-unix"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
PROJECT_NAME: "NAME_HERE"
PROJECT_NAME: REPLACE_NAME_HERE
jobs:
format-lint:
name: "Formatting - format-lint"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
types: [published]
env:
preview: ${{ github.event_name == 'release' && contains(github.event.release.tag_name, 'preview') }}
PROJECT_NAME: "NAME_HERE"
PROJECT_NAME: REPLACE_NAME_HERE
jobs:
publish:
name: "Publish - publish"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
PROJECT_NAME: "NAME_HERE"
PROJECT_NAME: REPLACE_NAME_HERE
jobs:
test:
name: "Test - test"
Expand Down
19 changes: 19 additions & 0 deletions build/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
set -euo pipefail

export ARTIFACT_NAME="csv_parser_rs-$1"

# Build for the target
cargo build --release --locked --target "$1"

mkdir -p "$ARTIFACT_NAME"
# Create the artifact
cp "target/$1/release/csv_parser_rs" "$ARTIFACT_NAME"
cp "README.md" "LICENSE-APACHE" "LICENSE-MIT" "$ARTIFACT_NAME"

# Zip the artifact
if ! command -v zip &> /dev/null
then
sudo apt-get update && sudo apt-get install -yq zip
fi
zip -r "$ARTIFACT_NAME.zip" "$ARTIFACT_NAME"

0 comments on commit c27e595

Please sign in to comment.