Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace neutralino using tauri #173

Merged
merged 12 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: Semantic Release
on:
push:
branches:
- main
- alpha
jobs:
build-and-upload:
name: Build and Upload Artifacts
permissions:
contents: write
strategy:
matrix:
include:
# - platform: 'macos-latest' # for Arm based macs (M1 and above).
# args: '-- --target aarch64-apple-darwin'
# - platform: 'macos-latest' # for Intel based macs.
# args: '-- --target x86_64-apple-darwin'
- platform: 'macos-latest' # for Universal mac.
args: '-- --target universal-apple-darwin'
- platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04.
args: ''
- platform: 'windows-latest'
args: ''
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

# https://tauri.app/v1/guides/building/cross-platform/#example-workflow
- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

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

- name: Install dependencies
run: npm install

- name: Update version declarations
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
npx semantic-release --dry-run

- name: Build Tauri
run: npm run tauri build ${{ matrix.args }}

- name: Move artifacts to outputs
run: |
mkdir outputs

- name: Move macOS artifacts to outputs
if: matrix.platform == 'macos-latest'
run: |
cp -r src-tauri/target/universal-apple-darwin/release/bundle/dmg/Notepad_*_universal.dmg outputs/

- name: Move Ubuntu artifacts to outputs
if: matrix.platform == 'ubuntu-22.04'
run: |
cp src-tauri/target/release/bundle/deb/notepad_*_amd64.deb outputs/
cp src-tauri/target/release/bundle/rpm/notepad-*.x86_64.rpm outputs/

- name: Move Windows artifacts to outputs
if: matrix.platform == 'windows-latest'
run: |
cp src-tauri/target/release/bundle/msi/Notepad_*_x64_en-US.msi outputs/
cp src-tauri/target/release/bundle/nsis/Notepad_*_x64-setup.exe outputs/

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: tauri-artifacts-${{ strategy.job-index }}
path: outputs/
# path: |
# src-tauri/target/universal-apple-darwin/release/bundle/macos/Notepad.app
# src-tauri/target/universal-apple-darwin/release/bundle/dmg/Notepad_*_universal.dmg
# src-tauri/target/release/bundle/deb/notepad_*_amd64.deb
# src-tauri/target/release/bundle/rpm/notepad-*.x86_64.rpm
# src-tauri/target/release/bundle/msi/Notepad_*_x64_en-US.msi
# src-tauri/target/release/bundle/nsis/Notepad_*_x64-setup.exe
retention-days: 1

semantic-release:
name: Semantic Release
runs-on: ubuntu-latest
needs: build-and-upload
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: Install dependencies
run: npm install

- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: tauri-artifacts-*
merge-multiple: true

- name: Run Semantic Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx semantic-release
19 changes: 0 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,3 @@ dev-dist

build/
www/

# Neutralinojs: from below

# Developer tools' files
.lite_workspace.lua

# Neutralinojs binaries and builds
/bin
/dist
/build

# Neutralinojs client (minified)
neutralino.js

# Neutralinojs related files
.storage
*.log

.tmp
44 changes: 44 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/semantic-release.json",
"branches": [
"main",
{
"name": "alpha",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/exec",
{
"verifyReleaseCmd": "node scripts/versioning.js ${nextRelease.version}"
}
],
[
"@semantic-release/github",
{
"assets": [
"Notepad_*_universal.dmg",
"notepad_*_amd64.deb",
"notepad-*.x86_64.rpm",
"Notepad_*_x64_en-US.msi",
"Notepad_*_x64-setup.exe"
]
}
],
[
"@semantic-release/git",
{
"assets": [
"package.json",
"CHANGELOG.md",
"src-tauri/tauri.conf.json",
"src-tauri/Cargo.toml"
]
}
]
]
}
79 changes: 48 additions & 31 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,82 @@
# How to Contribute

#### For new comers, this quick links will definitely help you.
#### For newcomers, these quick links will definitely help you:

- [**Creating an issue or pull request**](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/working-with-your-remote-repository-on-github-or-github-enterprise/creating-an-issue-or-pull-request)
- [**Contributing to projects**](https://docs.github.com/en/get-started/quickstart/contributing-to-projects)
- [Code of conduct](/CODE_OF_CONDUCT.md)

#### For who are new to open source world
#### For those new to the open-source world:

- [**Check this gist**](https://gist.github.com/Muhammed-Rahif/90e2bbde068e49a0ea1ff1c407e4c62c)
- [**How to Contribute to Open Source**](https://opensource.guide/how-to-contribute/)
- [**Our good first issues**](https://github.com/Muhammed-Rahif/Notepad/labels/good%20first%20issue)

---

## ![Pull request](https://user-images.githubusercontent.com/73386156/147833818-dca9fcba-c8a9-49ad-b961-66b7b813ef55.png) Making a Pull Request
## ![Getting started](https://user-images.githubusercontent.com/73386156/147833818-dca9fcba-c8a9-49ad-b961-66b7b813ef55.png) Getting Started

1. Firstly, [fork our repo](https://github.com/Muhammed-Rahif/Notepad/fork) by clicking the fork button on top right corner.
2. Clone that forked repo to your local system
This project uses **semantic versioning** and **`semantic-release`** to automate versioning and package publishing. The project follows the [semantic-release](https://semantic-release.gitbook.io/) npm package, which automatically determines the next version number based on your commit messages and updates the release accordingly.

```bash
git clone https://github.com/<your-github-username>/Notepad
```
Branches:
- **`main`**: Production-ready code
- **`alpha`**: Alpha and pre-release code

3. Navigate to the cloned repo folder in your local system.
### Semantic Commit Messages:
While using semantic commit messages is not mandatory, it helps ensure that automated releases follow [semantic versioning](https://semver.org/). You can learn more about the [semantic commit guidelines here](https://www.conventionalcommits.org/).

```bash
cd Notepad
```
### Steps to contribute:

4. Create a new branch for making changes.
1. [Fork our repo](https://github.com/Muhammed-Rahif/Notepad/fork) by clicking the fork button in the top-right corner.
2. Clone the forked repo to your local system:

```bash
git checkout -b <your-branch-name>
```
```bash
git clone https://github.com/<your-github-username>/Notepad
```

5. Make changes and add them to git staging and commit using a message related to what you changed.
3. Navigate to the cloned repo:

```bash
git add <folder-or-file-paths>
git commit -m "you commit message"
```
```bash
cd Notepad
```

6. Push your local commits to the remote repository
4. Checkout the `alpha` branch (for new features and fixes) or `main` (for hotfixes):

```bash
git push origin <your-branch-name>
```
```bash
git checkout alpha
```

7. [Create a Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request)
5. Create a new branch for your changes:

**Hoooray 🎉 !!! You've made your first contribution to Notepad! 🎊**
```bash
git checkout -b <your-branch-name>
```

6. Make your changes, then stage and commit them. If possible, follow semantic commit guidelines:

```bash
git add <folder-or-file-paths>
git commit -m "feat: add new feature to enhance performance"
```

7. Push your changes to the remote repo:

```bash
git push origin <your-branch-name>
```

8. [Create a Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request)

**Congratulations! 🎉 You've contributed to Notepad! 🎊**

---

**_After this, the maintainers will review the PR and will merge it if it helps move the LinkFree project forward. Otherwise, it will be given constructive feedback and suggestions for the changes needed to add the PR to the codebase._**
**_The maintainers will review your PR. If it moves the project forward, it will be merged. If not, you'll receive constructive feedback to improve your contribution._**

---

## ![issue](https://user-images.githubusercontent.com/73386156/147833747-add74383-644d-42f4-8c24-f061e5e69a18.png) Making issues for improvements
## ![issue](https://user-images.githubusercontent.com/73386156/147833747-add74383-644d-42f4-8c24-f061e5e69a18.png) Making Issues for Improvements

**In order to discuss changes, you are welcome to [open an issue](https://github.com/Muhammed-Rahif/Notepad/issues/new/choose) about what you would like to contribute. Enhancements are always encouraged and appreciated.**
**Feel free to [open an issue](https://github.com/Muhammed-Rahif/Notepad/issues/new/choose) to discuss potential contributions or suggest enhancements.**

### **All the very best from the community.! 🤝**
### **All the very best from the community! 🤝**
Loading