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

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

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