Skip to content

Commit

Permalink
chore: bump version to 0.0.1-109
Browse files Browse the repository at this point in the history
  • Loading branch information
ityuany committed Jul 29, 2024
1 parent 6bfbda6 commit cdc3948
Show file tree
Hide file tree
Showing 19 changed files with 104 additions and 33 deletions.
101 changes: 86 additions & 15 deletions .github/workflows/publish-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,44 @@ on:
types: [published]

jobs:
build-and-test:

unit-testing:
name: Unit testing
strategy:
matrix:
include:
# Linux targets
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
# Windows targets
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: windows-latest
target: i686-pc-windows-msvc
# macOS targets
- os: macos-14
target: aarch64-apple-darwin
- os: macos-13
target: x86_64-apple-darwin
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Run tests
run: |
cargo test --workspace --exclude e2e -- --nocapture
env:
RUST_BACKTRACE: full

build:
needs: unit-testing
strategy:
matrix:
include:
Expand Down Expand Up @@ -37,47 +74,36 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Install Dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y openssl pkg-config libssl-dev musl-tools
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
target: ${{ matrix.target }}

- name: Run Tests
run: cargo test
env:
RUST_BACKTRACE: full

- name: Build Binary
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --release --target ${{ matrix.target }}

- name: Strip Binary (Linux and macOS only)
if: matrix.os != 'windows-latest'
run: |
for file in snm node npm npx pnpm pnpx yarn; do
strip "target/${{ matrix.target }}/release/$file"
done
- name: Create Archive
shell: bash
run: |
mkdir archive
cp LICENSE README.md target/${{ matrix.target }}/release/{node,npm,npx,pnpm,pnpx,snm,yarn} archive/
tar -czf ${{ matrix.target }}.tar.gz -C archive LICENSE README.md node npm npx pnpm pnpx snm yarn
ls -l
- name: Calculate SHA256 Checksum
run: |
echo "Calculating SHA256 for ${{ matrix.target }}.tar.gz..."
Expand All @@ -88,21 +114,66 @@ jobs:
fi
cat ${{ matrix.target }}.sha256
shell: bash

- name: Upload Artifacts tar.gz
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}
path: ${{ matrix.target }}.tar.gz

- name: Upload Artifacts sha256
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}.sha256
path: ${{ matrix.target }}.sha256

e2e-testing:
name: E2E testing
needs: build
strategy:
matrix:
include:
# Linux targets
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
# Windows targets
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: windows-latest
target: i686-pc-windows-msvc
# macOS targets
- os: macos-14
target: aarch64-apple-darwin
- os: macos-13
target: x86_64-apple-darwin
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
target: ${{ matrix.target }}

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: ${{ matrix.target }}
path: .

- name: Tar downloaded files
shell: bash
run: |
tar -xvf ${{ matrix.target }}.tar.gz -C e2e/tests
cd e2e/tests
ls -R
- name: e2e tests
run: |
cargo test --package e2e -- --nocapture
publish-github-release:
publish:
name: Publish To Github Release
runs-on: ubuntu-latest
needs: build-and-test
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "snm"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"
authors = ["ityuany"]

Expand Down
2 changes: 1 addition & 1 deletion crates/cli_node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cli_node"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/cli_npm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cli_npm"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/cli_npx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cli_npx"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/cli_pnpm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cli_pnpm"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/cli_pnpx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cli_pnpx"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/cli_yarn/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cli_yarn"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/dev-tools/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dev-tools"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/snm_atom/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "snm_atom"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/snm_config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[package]
name = "snm_config"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/snm_download_builder/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "snm_download_builder"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/snm_ni/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "snm_ni"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/snm_node_version/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "snm_node_version"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/snm_npmrc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "snm_npmrc"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/snm_package_json/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "snm_package_json"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/snm_shim/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "snm_shim"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/snm_tarball/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "snm_tarball"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/snm_utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "snm_utils"
version = "0.0.1-108"
version = "0.0.1-109"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down

0 comments on commit cdc3948

Please sign in to comment.