Skip to content

Commit

Permalink
Merge pull request #1 from hiltontj/hiltontj/publish-actions
Browse files Browse the repository at this point in the history
Add Github Actions for Testing and Publishing
  • Loading branch information
hiltontj authored Nov 19, 2023
2 parents 9fd88d8 + 44c818a commit deb5409
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 15 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: 'publish'
on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
publish-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4

- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
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: yarn install # change this to npm or pnpm depending on which one you use

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
releaseName: 'App v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
39 changes: 39 additions & 0 deletions .github/workflows/test-on-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 'test-on-pr'
on: [pull_request]

jobs:
test-tauri:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4

- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'

- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
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: yarn install # change this to npm or pnpm depending on which one you use

- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog

All noteable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

# Unreleased

# 0.1.0 (19 November 2023)

Initial Release
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<div align="center">
<img src="public/solars.svg" width="128px"/>
<h1>solars</h1>
</div>

<p align="center"><i>Visualize the planets of our solar system</i></p>

![GitHub all releases](https://img.shields.io/github/downloads/hiltontj/solars/total)

</div>

## Overview

`solars` is a learning tool for exploring our solar system. Originally developed as a quick way to visualize planetary alignment on a given date, `solars` is also a foray into application design and the world of application development using [Tauri][tauri-app].
Expand All @@ -25,28 +27,31 @@ Some basic options allow you to customize the view:
<img src="public/solars_options.gif" />
</div>

## Build
## Build & Development

Clone this repository to your local machine. Since `solars` is a Tauri app, you may read the guides for [Developing Tauri apps][tauri-develop] and for [Building Tauri apps][tauri-build] on the official website.

Clone this repository to your local machine. Since `solars` is a Tauri app, in order to build it, please follow the steps to build `solars` on your platform [here][tauri-build]. You will need one of Tauri's CLI utilities installed, e.g., `tauri-cli`:
You will need one of Tauri's CLI utilities installed, e.g., `tauri-cli`:

```
cargo install tauri-cli
cargo tauri build
```

Currently, `solars` is not distributed on any app platforms.
You can then build the application bundle for your local operating system:

[tauri-build]: https://tauri.app/v1/guides/building/

## Development
```
cargo tauri build
```

Clone this repository to your local machine. Since `solars` is a Tauri app, you can use the `tauri-cli` to run the development environment:
Or, launch the development server:

```
cargo install tauri-cli
cargo tauri dev
```

[tauri-build]: https://tauri.app/v1/guides/building/
[tauri-develop]: https://tauri.app/v1/guides/development/development-cycle

## License

This project is licensed under the MIT License.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "solars",
"private": true,
"version": "0.0.0",
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "solars"
version = "0.0.0"
version = "0.1.0"
description = "Visualize the planets of our solar system."
authors = ["Trevor Hilton"]
license = "MIT"
repository = ""
repository = "https://github.com/hiltontj/solars"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down

0 comments on commit deb5409

Please sign in to comment.