tauri-apps/.gitea/workflows/example.yaml

54 lines
2.3 KiB
YAML

name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
steps:
- 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
run: |
ls ${{ gitea.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."