Skip to content

Update app.csv

Update app.csv #57

name: Build App with Cache
on:
workflow_dispatch:
push:
jobs:
Build:
permissions: write-all
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [windows]
include:
# - build: linux
# os: ubuntu-20.04
# rust: stable
# target: x86_64-unknown-linux-musl
# archive-name: target-linux.tar.gz
- build: windows
os: windows-latest
rust: stable-x86_64-msvc
target: x86_64-pc-windows-msvc
# archive-name: target-windows.tar.gz
# - build: macos
# os: macos-latest
# rust: stable
# target: x86_64-apple-darwin
# archive-name: target-macos.tar.gz
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: install node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- name: install dependencies (ubuntu only)
if: matrix.os == 'ubuntu-20.04'
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev gnome-video-effects gnome-video-effects-extra
version: 1.1
- name: rust cache restore
uses: actions/cache/restore@v3
id: cache_store
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: build for Ubuntu
if: matrix.os == 'ubuntu-20.04'
run: npm run build:all-unix
- name: build for MacOS
if: matrix.os == 'macos-latest'
run: |
rustup target add aarch64-apple-darwin
npm run build:all-unix
- name: build for windows
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
npm run build:all-windows
- uses: actions/upload-artifact@v3
if: ${{ success() }}
with:
name: artifact
path: output/
- name: rust cache store
uses: actions/cache/save@v3
if: steps.cache_store.outputs.cache-hit != 'true'
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
Upload:
permissions: write-all
needs: [Build]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: output/
- name: Display structure of downloaded files
run: ls -R
working-directory: output
- name: Delete current release assets
uses: andreaswilli/delete-release-assets-action@v2.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: latest
deleteOnlyFromDrafts: false
- name: Tag Repo
uses: richardsimko/update-tag@v1.0.6
with:
tag_name: latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload
uses: softprops/action-gh-release@v1
if: ${{ success() }}
with:
tag: ${{ github.ref_name }}
tag_name: latest
files: output/*/*
prerelease: false
generate_release_notes: true