-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: basic CI present, lints missing yet
- Loading branch information
Szőke Attila (Shiwaforce.com Zrt.)
authored and
Szőke Attila (Shiwaforce.com Zrt.)
committed
Feb 24, 2024
1 parent
546b5b8
commit 5ea6788
Showing
5 changed files
with
159 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Conventional commits | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["**"] | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
name: Check conventional commit compliance | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Check commits | ||
uses: cocogitto/cocogitto-action@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Wait on commit checks | ||
uses: lewagon/wait-on-check-action@master | ||
with: | ||
ref: ${{ github.sha }} | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
check-name: "Check conventional commit compliance" | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git config --global user.email [email protected] | ||
git config --global user.name github-actions | ||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Install cargo-edit | ||
uses: baptiste0928/cargo-install@v2 | ||
with: | ||
crate: cargo-edit | ||
|
||
- name: Set up environment with Volta | ||
uses: volta-cli/action@v4 | ||
|
||
- name: Bump | ||
id: release | ||
uses: cocogitto/cocogitto-action@main | ||
with: | ||
check-latest-tag-only: true | ||
release: true | ||
git-user: "github-actions" | ||
git-user-email: "[email protected]" | ||
|
||
- name: Generate Changelog | ||
run: cog changelog --at ${{ steps.release.outputs.version }} -t full_hash > GITHUB_CHANGELOG.md | ||
|
||
- name: Upload github release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body_path: GITHUB_CHANGELOG.md | ||
tag_name: ${{ steps.release.outputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Tauri | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["**"] | ||
types: [opened, synchronize] | ||
workflow_dispatch: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
SQLX_OFFLINE: true | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
permissions: | ||
contents: write | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
platform: [macos-latest, ubuntu-22.04, windows-latest] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up environment with Volta | ||
uses: volta-cli/action@v4 | ||
|
||
- name: Install stable toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Install Ubuntu dependencies | ||
if: matrix.platform == 'ubuntu-22.04' | ||
run: | | ||
sudo apt update | ||
sudo apt install libwebkit2gtk-4.0-dev \ | ||
build-essential \ | ||
curl \ | ||
wget \ | ||
file \ | ||
libssl-dev \ | ||
libgtk-3-dev \ | ||
libayatana-appindicator3-dev \ | ||
librsvg2-dev | ||
- name: Setup rust cache | ||
uses: Swatinem/[email protected] | ||
with: | ||
shared-key: whooosh | ||
workspaces: src-tauri | ||
|
||
- name: Getting dependencies | ||
run: yarn install --immutable | ||
|
||
- name: Build | ||
run: yarn tauri build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
_default: | ||
@just --list --unsorted | ||
|
||
_check-app app: | ||
@if ! [ -x "$(command -v {{app}})" ]; then \ | ||
echo "\033[1;31m{{app}} is not installed ✘!\033[0m"; \ | ||
exit 1; \ | ||
fi | ||
|
||
install-cargo-tooling: | ||
# Installing (or if installed updating) cargo tooling | ||
@just _check-app cargo | ||
@cargo install cargo-watch cargo-audit cargo-llvm-cov cargo-edit sqlx-cli cocogitto | ||
|
||
add-git-hook: | ||
# Adding Cocogitto hook to local repository | ||
@just _check-app cog | ||
@cog install-hook pre-push |