Skip to content

ci

ci #235

Workflow file for this run

name: ci
on:
pull_request:
push:
branches:
- master
schedule:
- cron: '00 01 * * *'
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: build
run: cargo build
- name: release deb
run: |
cargo install cargo-deb
cargo deb
- name: e2e test
run: |
docker compose build app
docker compose up --abort-on-container-exit --exit-code-from app
- name: Set artifact name
shell: bash
working-directory: target/debian
run: |
echo "ARTIFACT_NAME=$(echo *.deb)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
path: target/debian/*.deb
name: ${{ env.ARTIFACT_NAME }}
if-no-files-found: error
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: 'target/debian/*.deb'
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}