2021-03-29 17:22:14 +00:00
|
|
|
name: "Upload Release Artifacts"
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
|
|
|
|
|
|
|
jobs:
|
2021-05-09 10:57:37 +00:00
|
|
|
build-deb:
|
|
|
|
name: 'Build Debian packages'
|
2021-03-29 17:22:14 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Creating environment variables
|
|
|
|
run: echo "release_version=${git_ref#v}" >> $GITHUB_ENV
|
|
|
|
env:
|
|
|
|
git_ref: ${{ github.ref }}
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- name: Install Dependencies
|
|
|
|
env:
|
|
|
|
ACCEPT_EULA: Y
|
2023-01-02 15:38:55 +00:00
|
|
|
run: sudo apt-get -y update && sudo apt-get install -f && sudo apt-get -y install libsqlite3-dev libclang-11-dev
|
2022-02-01 04:42:26 +00:00
|
|
|
- uses: Swatinem/rust-cache@v1
|
2021-03-29 17:22:14 +00:00
|
|
|
- name: Build
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --verbose
|
|
|
|
- name: Test
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --verbose
|
|
|
|
- name: Install cargo-deb (if missing)
|
|
|
|
run: |
|
|
|
|
which cargo-deb || cargo install cargo-deb
|
|
|
|
- name: Build Debian Server Package
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: deb
|
|
|
|
args: -p server
|
|
|
|
- name: Build Debian Client Package
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: deb
|
|
|
|
args: -p client
|
2021-05-09 10:57:37 +00:00
|
|
|
- name: Save DEBs
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: packaged-deb
|
|
|
|
path: target/debian/*.deb
|
|
|
|
|
|
|
|
release:
|
|
|
|
name: 'Release packages'
|
|
|
|
runs-on: ubuntu-latest
|
2022-01-31 20:08:55 +00:00
|
|
|
needs: [build-deb]
|
2021-05-09 10:57:37 +00:00
|
|
|
steps:
|
|
|
|
- name: Get artifacts
|
|
|
|
uses: actions/download-artifact@v2
|
2021-03-29 17:22:14 +00:00
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
2021-05-09 10:57:37 +00:00
|
|
|
files: |
|
|
|
|
packaged-deb/*.deb
|
|
|
|
packaged-rpm/*.rpm
|
2021-03-29 17:22:14 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|