From cc8489bffa1b9e8a73188e205622f79dae2737a8 Mon Sep 17 00:00:00 2001 From: Fabio Mendes Date: Wed, 21 Aug 2024 12:48:10 -0400 Subject: [PATCH] Prepare for release v0.1.1 --- .github/workflows/rust_ci.yml | 37 +++++++++++++++++++++++------------ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/.github/workflows/rust_ci.yml b/.github/workflows/rust_ci.yml index e08b5d0..669ffff 100644 --- a/.github/workflows/rust_ci.yml +++ b/.github/workflows/rust_ci.yml @@ -11,22 +11,42 @@ env: CARGO_TERM_COLOR: always jobs: - rust-checks: - name: Build + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Enable caching + uses: Swatinem/rust-cache@v2 + + - name: Run fmt command + run: cargo fmt --all -- --check --color always + + - name: Run clippy command + run: cargo clippy --all-targets --all-features --workspace -- -D warnings + + deploy: + if: github.ref_type == 'tag' + needs: build runs-on: ubuntu-latest permissions: contents: write + strategy: + matrix: + chip: ["nrf52840"] steps: - name: Checkout repository uses: actions/checkout@v4 - name: Validate version - if: github.event_name == 'push' && github.ref_type == 'tag' run: | export CARGO_VERSION=v$(awk '/^version/ {print $3}' Cargo.toml | head -1 | tr -d '"') export GIT_VERSION=${{github.ref_name}} - echo "$CARGO_VERSION and $GIT_VERSION" + echo "Cargo version: $CARGO_VERSION" + echo "Git version: $GIT_VERSION" if [[ "${CARGO_VERSION}" != "$GIT_VERSION" ]]; then echo "Tag version and Cargo.toml version don't match" 1>&2 exit 1 @@ -35,12 +55,6 @@ jobs: - name: Enable caching uses: Swatinem/rust-cache@v2 - - name: Run fmt command - run: cargo fmt --all -- --check --color always - - - name: Run clippy command - run: cargo clippy --all-targets --all-features --workspace -- -D warnings - - name: Run build command env: DEFMT_LOG: warn @@ -48,9 +62,8 @@ jobs: - name: Publish release uses: ghalactic/github-release-from-tag@v5 - if: github.ref_type == 'tag' with: generateReleaseNotes: "true" assets: | - path: target/thumbv7em-none-eabihf/release/tempsys-firmware - name: tempsys-firmware-${{ github.ref_name }}-nrf52840.elf + name: tempsys-firmware-${{ github.ref_name }}-${{ matrix.chip }}.elf diff --git a/Cargo.lock b/Cargo.lock index 20c37f7..07cc766 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1110,7 +1110,7 @@ dependencies = [ [[package]] name = "tempsys-firmware" -version = "0.1.0" +version = "0.1.1" dependencies = [ "built", "cortex-m", diff --git a/Cargo.toml b/Cargo.toml index d6f2831..79c728d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" name = "tempsys-firmware" -version = "0.1.0" +version = "0.1.1" authors = ["Fabio Mendes "] resolver = "2"