Skip to content

Commit

Permalink
Add build-release to main CI
Browse files Browse the repository at this point in the history
  • Loading branch information
macpie committed May 14, 2024
1 parent 64ef69d commit 27a6506
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,40 @@ jobs:
- name: Run unit and integration tests
env:
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres"
run: cargo test -p ${{ matrix.package }} -- --include-ignored
run: cargo test -p ${{ matrix.package }} -- --include-ignored

build-release:
needs: [fmt, clippy, tests]
runs-on: oracles-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-build-release
cancel-in-progress: true
if: contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable

- name: Install protoc
run: sudo apt-get install -y protobuf-compiler

- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build Release
run: cargo build --all --release

- name: Debian packaging
env:
PACKAGECLOUD_API_KEY: ${{ secrets.PACKAGECLOUD_API_KEY }}
run: |
chmod +x ./.github/scripts/make_debian.sh
./.github/scripts/make_debian.sh

0 comments on commit 27a6506

Please sign in to comment.