First cut
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 28s
Details
|
@ -9,8 +9,42 @@ jobs:
|
|||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
||||
- name: Install jq
|
||||
uses: dcarbone/install-jq-action@v2.0.2
|
||||
- name: Install gotempl
|
||||
run: |
|
||||
mkdir -p $HOME/bin
|
||||
wget -O $HOME/bin/gotempl https://github.com/link-society/gotempl/releases/download/v0.7.0/gotempl-linux-amd64
|
||||
chmod +x $HOME/bin/gotempl
|
||||
- name: Install dependencies (ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-20.04'
|
||||
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
- name: Rust cache
|
||||
uses: swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: './src-tauri -> target'
|
||||
- name: Install windows cross-compiling deps
|
||||
run: sudo apt install nsis lld llvm
|
||||
- name: And allow rust to work with them
|
||||
run: |
|
||||
rustup target add x86_64-pc-windows-msvc
|
||||
cargo install xwin
|
||||
xwin splat --output ~/.xwin
|
||||
mkdir $HOME/.cargo -p
|
||||
cat > $HOME/.cargo/config.toml <<<EOF
|
||||
[target.x86_64-pc-windows-msvc]
|
||||
linker = "lld"
|
||||
rustflags = [
|
||||
"-Lnative=/home/username/.xwin/crt/lib/x86_64",
|
||||
"-Lnative=/home/username/.xwin/sdk/lib/um/x86_64",
|
||||
"-Lnative=/home/username/.xwin/sdk/lib/ucrt/x86_64"
|
||||
]
|
||||
EOF
|
||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
||||
- name: List files in the repository
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
bin/
|
||||
app/
|
|
@ -0,0 +1,20 @@
|
|||
[
|
||||
{
|
||||
"appName": "Gmail",
|
||||
"url": "https://gmail.com",
|
||||
"version": "0.0.1",
|
||||
"shortName": "gmail"
|
||||
},
|
||||
{
|
||||
"appName": "Google Calendar",
|
||||
"url": "https://calendar.google.com",
|
||||
"version": "0.0.1",
|
||||
"shortName": "gcal"
|
||||
},
|
||||
{
|
||||
"appName": "Logitech Media Server",
|
||||
"url": "http://192.168.1.95:8080",
|
||||
"version": "0.0.1",
|
||||
"shortName": "lms-client"
|
||||
}
|
||||
]
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
mkdir -p app
|
||||
|
||||
for i in $(seq 0 $(expr $(jq '. | length' < apps.json) - 1)); do
|
||||
jq ".[$i]" < apps.json > app/data.json
|
||||
cd app
|
||||
#rm -rf *
|
||||
mkdir -p src
|
||||
for t in ../template/src/*; do
|
||||
$HOME/bin/gotempl --data-json data.json< $t > src/$(basename $t)
|
||||
done
|
||||
cp -r ../template/src-tauri .
|
||||
$HOME/bin/gotempl --data-json data.json< ../template/src-tauri/Cargo.toml > src-tauri/Cargo.toml
|
||||
$HOME/bin/gotempl --data-json data.json< ../template/src-tauri/tauri.conf.json > src-tauri/tauri.conf.json
|
||||
cd src-tauri
|
||||
cargo tauri build
|
||||
cd ..
|
||||
cd ..
|
||||
done
|
|
@ -0,0 +1,23 @@
|
|||
[package]
|
||||
name = "{{ .Data.shortName }}"
|
||||
version = "{{ .Data.version }}"
|
||||
description = "{{ .Data.appName }}"
|
||||
authors = ["Martyn's CI System"]
|
||||
license = "BSD"
|
||||
repository = "https://git.martyn.berlin/martyn/tauri-apps"
|
||||
edition = "2023"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "1.5", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "1.5", features = ["shell-open"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
|
||||
[features]
|
||||
# this feature is used for production builds or when `devPath` points to the filesystem
|
||||
# DO NOT REMOVE!!
|
||||
custom-protocol = ["tauri/custom-protocol"]
|
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
tauri_build::build()
|
||||
}
|
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 974 B |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 7.6 KiB |
After Width: | Height: | Size: 903 B |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,15 @@
|
|||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
|
||||
#[tauri::command]
|
||||
fn greet(name: &str) -> String {
|
||||
format!("Hello, {}! You've been greeted from Rust!", name)
|
||||
}
|
||||
|
||||
fn main() {
|
||||
tauri::Builder::default()
|
||||
.invoke_handler(tauri::generate_handler![greet])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"build": {
|
||||
"beforeDevCommand": "",
|
||||
"beforeBuildCommand": "",
|
||||
"devPath": "../src",
|
||||
"distDir": "../src",
|
||||
"withGlobalTauri": true
|
||||
},
|
||||
"package": {
|
||||
"productName": "{{ .Data.appName }}",
|
||||
"version": "{{ .Data.version }}"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
"all": false,
|
||||
"shell": {
|
||||
"all": false,
|
||||
"open": true
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"identifier": "com.gmail-tauri.dev",
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
]
|
||||
},
|
||||
"security": {
|
||||
"csp": null
|
||||
},
|
||||
"windows": [
|
||||
{
|
||||
"fullscreen": false,
|
||||
"resizable": true,
|
||||
"title": "{{ .Data.appName }}",
|
||||
"width": 800,
|
||||
"height": 600
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>{{ .Data.appName }}</title>
|
||||
<script type="module" src="/main.js" defer></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1 @@
|
|||
window.location.replace("{{ .Data.url }}");
|