Merge pull request #1 from Trivernis/gh-actions

Gh actions
pull/4/head
Julius Riegel 3 years ago committed by GitHub
commit 28b6bf7e89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,7 @@
name: Build and test api
on:
workflow_dispatch:
push:
branches: [ main, develop ]
pull_request:
@ -10,8 +11,14 @@ env:
CARGO_TERM_COLOR: always
jobs:
build:
defaults:
run:
shell: bash
working-directory: mediarepo-api
strategy:
fail-fast: false
matrix:
@ -19,11 +26,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: switch working directory
run: cd mediarepo-api
if: ${{ !env.ACT }}
- name: Cache build data
if: ${{ !env.ACT }}
uses: actions/cache@v2
with:
path: |
@ -37,8 +43,8 @@ jobs:
uses: knicknic/os-specific-run@v1.0.3
with:
linux: |
sudo apt update
sudo apt install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y
sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y
- name: Build
run: cargo build

@ -1,6 +1,7 @@
name: Build daemon
on:
workflow_dispatch:
push:
branches: [ main, develop ]
pull_request:
@ -12,6 +13,12 @@ env:
jobs:
build:
defaults:
run:
shell: bash
working-directory: mediarepo-daemon
strategy:
fail-fast: false
matrix:
@ -19,11 +26,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: switch working directory
run: cd mediarepo-daemon
if: ${{ !env.ACT }}
- name: Cache build data
if: ${{ !env.ACT }}
uses: actions/cache@v2
with:
path: |
@ -37,6 +43,7 @@ jobs:
run: cargo build --release --no-default-features
- name: Upload artifacts
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v2
with:
name: mediarepo-daemon-${{ runner.os }}

@ -5,11 +5,19 @@ on:
push:
branches:
- main
- github-actions
- develop
pull_request:
branches:
- main
- develop
jobs:
build-debug:
build-debug:
defaults:
run:
shell: bash
working-directory: mediarepo-ui
runs-on: ${{ matrix.os }}
strategy:
@ -19,11 +27,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: switch working directory
run: cd mediarepo-ui
if: ${{ !env.ACT }}
- name: Cache Dependencies
if: ${{ !env.ACT }}
id: cache-dependencies
uses: actions/cache@v2
with:
@ -58,13 +65,14 @@ jobs:
uses: knicknic/os-specific-run@v1.0.3
with:
linux: |
sudo apt update
sudo apt install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y
sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y
- name: Build project
run: cargo tauri build --debug
- name: Upload artifacts
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v2
with:
name: mediarepo-ui-${{ runner.os }}-debug
@ -74,6 +82,11 @@ jobs:
build-release:
defaults:
run:
shell: bash
working-directory: mediarepo-ui
runs-on: ${{ matrix.os }}
strategy:
@ -83,11 +96,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: switch working directory
run: cd mediarepo-ui
if: ${{ !env.ACT }}
- name: Cache Dependencies
if: ${{ !env.ACT }}
id: cache-dependencies
uses: actions/cache@v2
with:
@ -122,13 +134,14 @@ jobs:
uses: knicknic/os-specific-run@v1.0.3
with:
linux: |
sudo apt update
sudo apt install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y
sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y
- name: Build project
run: cargo tauri build
- name: Upload artifacts
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v2
with:
name: mediarepo-ui-${{ runner.os }}-release

@ -0,0 +1,50 @@
name: Run checks on all projects
on:
workflow_dispatch:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
if: ${{ !env.ACT }}
- name: Install OS-specific dependencies
uses: knicknic/os-specific-run@v1.0.3
with:
linux: |
sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install libwebkit2gtk-4.0-dev libgtk-3-dev libappindicator3-dev -y
- name: Check api
working-directory: mediarepo-api
run: cargo check --all-features
- name: Check daemon
working-directory: mediarepo-daemon
run: cargo check --no-default-features
- name: Install UI dependencies
working-directory: mediarepo-ui
run: |
npm i -g yarn
npm i -g @angular/cli
yarn install
- name: Lint ui frontend
working-directory: mediarepo-ui
run: yarn lint

@ -0,0 +1,19 @@
name: Create pre-release
on:
push:
branches:
- "master"
jobs:
pre-release:
name: Pre Release
runs-on: ubuntu-latest
steps:
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
prerelease: true
title: Latest Pre-Release
files: |
LICENSE
Loading…
Cancel
Save