diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..bb8e97f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,89 @@ +name: Release + +on: + push: + branches: + - main + tags: ['v*'] + +jobs: + build: + runs-on: ubuntu-22.04 + strategy: + fail-fast: true + matrix: + target: + - x86_64-unknown-linux-musl + + steps: + - uses: actions/checkout@v4.1.1 + + - name: install apt depenedencies + run: | + sudo apt-get update + sudo apt-get install -y musl-tools + + - name: Get Rust toolchain + id: toolchain + working-directory: . + run: | + awk -F'[ ="]+' '$1 == "channel" { print "toolchain=" $2 }' rust-toolchain >> "$GITHUB_OUTPUT" + + - uses: dtolnay/rust-toolchain@v1 + with: + toolchain: ${{ steps.toolchain.outputs.toolchain }} + targets: ${{ matrix.target }} + + - uses: Swatinem/rust-cache@v2.7.3 + + - name: install cargo-about + run: | + cargo install --locked cargo-about + + - name: Build + run: | + cargo build --target=${{ matrix.target }} --release --locked + + - name: Rename binaries + run: | + mkdir bin + gaia_bins=("tmtc-c2a") + for b in "${gaia_bins[@]}" ; do + cp "./target/${{ matrix.target }}/release/${b}" "./bin/${b}-${{ matrix.target }}" + done + ls -lh ./bin + + - uses: actions/upload-artifact@v4.3.1 + with: + name: release-executable-${{ matrix.target }} + if-no-files-found: error + path: ./bin/ + + release: + name: Release + needs: [ build ] + permissions: + contents: write + + runs-on: ubuntu-22.04 + + steps: + - uses: actions/download-artifact@v4.1.3 + with: + pattern: release-executable-* + merge-multiple: true + + - run: | + chmod +x tmtc-c2a + + - run: ls -lh + + - name: Release to GitHub Release + if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v0.1.15 + with: + draft: true + fail_on_unmatched_files: true + generate_release_notes: true + files: | + tmtc-c2a diff --git a/Cargo.lock b/Cargo.lock index bafa981..1d5a949 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -268,7 +268,7 @@ checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "c2a-devtools-frontend" -version = "0.6.1" +version = "0.7.0-beta.1" dependencies = [ "rust-embed", ] @@ -618,7 +618,7 @@ dependencies = [ [[package]] name = "gaia-ccsds-c2a" -version = "0.6.1" +version = "0.7.0-beta.1" dependencies = [ "anyhow", "async-trait", @@ -634,7 +634,7 @@ dependencies = [ [[package]] name = "gaia-stub" -version = "0.6.1" +version = "0.7.0-beta.1" dependencies = [ "prost", "prost-types", @@ -644,7 +644,7 @@ dependencies = [ [[package]] name = "gaia-tmtc" -version = "0.6.1" +version = "0.7.0-beta.1" dependencies = [ "anyhow", "async-trait", @@ -1927,7 +1927,7 @@ dependencies = [ [[package]] name = "structpack" -version = "0.6.1" +version = "0.7.0-beta.1" dependencies = [ "anyhow", "bitvec", @@ -2088,7 +2088,7 @@ dependencies = [ [[package]] name = "tmtc-c2a" -version = "0.6.1" +version = "0.7.0-beta.1" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 04e1a50..888d681 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ exclude = [ ] [workspace.package] -version = "0.6.1" +version = "0.7.0-beta.1" [workspace.dependencies] structpack = "0.6" diff --git a/devtools-frontend/Cargo.toml b/devtools-frontend/Cargo.toml index 56ca457..37e2fb1 100644 --- a/devtools-frontend/Cargo.toml +++ b/devtools-frontend/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "c2a-devtools-frontend" edition = "2021" -version = "0.6.1" +version = "0.7.0-beta.1" license = "MPL-2.0" [dependencies]