file-tree/.github/workflows/release.yaml

89 lines
2.5 KiB
YAML
Raw Normal View History

2025-02-22 02:58:40 -05:00
name: Release
on:
workflow_dispatch:
2025-02-22 04:35:05 -05:00
inputs:
version:
description: 'Version number'
required: true
2025-02-22 02:58:40 -05:00
jobs:
2025-02-22 03:46:59 -05:00
create_release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.DAMIEN_TOKEN }}
with:
2025-02-22 04:35:05 -05:00
tag_name: ${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
2025-02-22 03:46:59 -05:00
draft: false
prerelease: false
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
2025-02-22 02:58:40 -05:00
build:
2025-02-22 03:46:59 -05:00
needs: create_release
2025-02-22 02:58:40 -05:00
strategy:
fail-fast: true
matrix:
2025-02-25 02:15:57 +00:00
os: [ubuntu-latest, window-latest] #macos-latest,
2025-02-22 02:58:40 -05:00
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Install Node.js v20 LTS
uses: actions/setup-node@v3
with:
node-version: 22
2025-02-22 07:12:57 -05:00
- name: Install sharp dependencies for macOS
if: matrix.os == 'macos-latest'
run: |
brew install vips
2025-02-22 02:58:40 -05:00
- 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
2025-02-22 05:05:51 -05:00
- name: Install zip utility on Windows
if: matrix.os == 'windows-latest'
run: choco install zip -y
2025-02-22 04:22:13 -05:00
2025-02-22 02:58:40 -05:00
- name: Build application
run: npm run tauri build
2025-02-22 03:43:21 -05:00
- name: Zip release bundle
run: |
2025-02-22 03:46:59 -05:00
zip -r release_${{ matrix.os }}.zip ./src-tauri/target/release/bundle/
2025-02-22 02:58:40 -05:00
- name: Upload Release Assets
uses: actions/upload-release-asset@v1
env:
2025-02-22 03:18:34 -05:00
GITHUB_TOKEN: ${{ secrets.DAMIEN_TOKEN }}
2025-02-22 02:58:40 -05:00
with:
2025-02-22 03:46:59 -05:00
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./release_${{ matrix.os }}.zip
2025-02-22 04:35:05 -05:00
asset_name: file_tree_${{ github.event.inputs.version }}_${{ matrix.os }}.zip
2025-02-22 02:58:40 -05:00
asset_content_type: application/zip