This repository has been archived by the owner on Sep 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from maotovisk/dev
feat: new ui usage and version bump
- Loading branch information
Showing
12 changed files
with
178 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,85 @@ | ||
name: 'publish' | ||
name: "publish" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
publish-tauri: | ||
permissions: | ||
contents: write | ||
build-binaries: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [macos-latest, ubuntu-20.04, windows-latest] | ||
platform: | ||
- os: ubuntu-latest | ||
rust_target: x86_64-unknown-linux-gnu | ||
- os: macos-latest | ||
rust_target: x86_64-apple-darwin | ||
- os: macos-latest | ||
rust_target: aarch64-apple-darwin | ||
- os: windows-latest | ||
rust_target: x86_64-pc-windows-msvc | ||
|
||
runs-on: ${{ matrix.platform }} | ||
runs-on: ${{ matrix.platform.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
- name: install Rust stable | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: "Setup Rust" | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
default: true | ||
override: true | ||
profile: minimal | ||
toolchain: stable | ||
target: ${{ matrix.platform.rust_target }} | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: install dependencies (ubuntu only) | ||
if: matrix.platform == 'ubuntu-20.04' | ||
if: matrix.platform.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | ||
- name: install frontend dependencies | ||
run: pnpm install # change this to npm or pnpm depending on which one you use | ||
- uses: tauri-apps/tauri-action@v0 | ||
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf | ||
- uses: JonasKruckenberg/[email protected] | ||
id: tauri_build | ||
with: | ||
target: ${{ matrix.platform.rust_target }} | ||
|
||
# The artifacts output can now be used to upload the artifacts | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: artifacts | ||
path: "${{ join(fromJSON(steps.tauri_build.outputs.artifacts), '\n') }}" | ||
|
||
publish: | ||
needs: build-binaries | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# Download the previously uploaded artifacts | ||
- uses: actions/download-artifact@v3 | ||
id: download | ||
with: | ||
name: artifacts | ||
path: artifacts | ||
# And create a release with the artifacts attached | ||
- name: "create release" | ||
uses: softprops/action-gh-release@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
with: | ||
tagName: hitsound-copier-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version | ||
releaseName: 'Hitsound Copier v__VERSION__' | ||
releaseBody: 'This is a automated release.' | ||
releaseDraft: true | ||
prerelease: false | ||
draft: false | ||
files: ./artifacts/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script lang="ts"> | ||
let icon: string = "info"; | ||
let message: string = ""; | ||
let color: string = "green"; | ||
window.sendNotification = ({ | ||
icon: notificationIcon, | ||
color: notificationColor, | ||
message: notificationMessage, | ||
}: { | ||
icon: string; | ||
message: string; | ||
color: string; | ||
}) => { | ||
icon = notificationIcon; | ||
message = notificationMessage; | ||
color = notificationColor; | ||
ui("#toast"); | ||
}; | ||
</script> | ||
|
||
<div class="toast {color}" id="toast"> | ||
<i>{icon}</i> | ||
<span>{message}</span> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.