Some checks failed
🚀 Lint & Test & Deploy / release (push) Failing after 3m17s
77 lines
2.1 KiB
YAML
77 lines
2.1 KiB
YAML
name: 🚀 Lint & Test & Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: ["*"]
|
|
tags: ["*"]
|
|
pull_request:
|
|
branches: ["*"]
|
|
|
|
env:
|
|
PNPM_CACHE_FOLDER: ~/.pnpm-store
|
|
CARGO_HOME: ~/.cargo
|
|
CARGO_TARGET_DIR: target
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
container: git.max-richter.dev/max/nodarium-ci:655b6a18b282f0cddcc750892e575ee6c311036b
|
|
|
|
steps:
|
|
- name: 📑 Checkout Code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
- name: 💾 Setup pnpm Cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ env.PNPM_CACHE_FOLDER }}
|
|
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-
|
|
|
|
- name: 🦀 Cache Cargo
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-
|
|
|
|
- name: 📦 Install Dependencies
|
|
run: pnpm install --frozen-lockfile --store-dir ${{ env.PNPM_CACHE_FOLDER }}
|
|
|
|
- name: 🧹 Quality Control
|
|
run: ./.gitea/scripts/ci-checks.sh
|
|
|
|
- name: 🛠️ Build
|
|
run: ./.gitea/scripts/build.sh
|
|
|
|
- name: 🚀 Create Release Commit
|
|
if: gitea.ref_type == 'tag'
|
|
run: ./.gitea/scripts/create-release.sh
|
|
|
|
- name: 🏷️ Create Gitea Release
|
|
if: gitea.ref_type == 'tag'
|
|
uses: akkuman/gitea-release-action@v1
|
|
with:
|
|
tag_name: ${{ gitea.ref_name }}
|
|
release_name: Release ${{ gitea.ref_name }}
|
|
body_path: CHANGELOG.md
|
|
draft: false
|
|
prerelease: false
|
|
|
|
- name: 🚀 Deploy Changed Files via rclone
|
|
run: ./.gitea/scripts/deploy-files.sh
|
|
env:
|
|
REMOTE_DIR: ${{ vars.REMOTE_DIR }}
|
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
SSH_HOST: ${{ vars.SSH_HOST }}
|
|
SSH_PORT: ${{ vars.SSH_PORT }}
|
|
SSH_USER: ${{ vars.SSH_USER }}
|