Create release.yaml
This commit is contained in:
parent
86e85e70f0
commit
072cb029c3
90
.github/workflows/release.yaml
vendored
Normal file
90
.github/workflows/release.yaml
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version number'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Cache Rust
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ./src-tauri/target
|
||||
key: ${{matrix.os}}-${{ hashFiles('./src-tauri/Cargo.lock') }}
|
||||
|
||||
# Cache Rust
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.cargo
|
||||
key: ${{matrix.os}}-${{ hashFiles('./src-tauri/Cargo.lock') }}
|
||||
|
||||
# Cache Node
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ./node_modules
|
||||
key: ${{matrix.os}}-${{ hashFiles('./package-lock.json') }}
|
||||
|
||||
# Cache Next.js
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ./src-next/.next
|
||||
key: ${{matrix.os}}
|
||||
|
||||
- name: Install Node.js v20 LTS
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Install Rust with Clippy
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Install Tauri dependencies
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt install --reinstall ca-certificates
|
||||
sudo update-ca-certificates -f
|
||||
sudo apt-get install javascriptcoregtk-4.1 libsoup-3.0 webkit2gtk-4.1 libayatana-appindicator3-dev librsvg2-dev -y
|
||||
|
||||
- name: Install node dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Build application
|
||||
run: npm run tauri build
|
||||
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.event.inputs.version }}
|
||||
release_name: Release ${{ github.event.inputs.version }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
- name: Upload Release Assets
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: src-tauri/target/release/bundle/**
|
||||
asset_name: my_app_${{ github.event.inputs.version }}
|
||||
asset_content_type: application/zip
|
Loading…
x
Reference in New Issue
Block a user