Skip to content

Commit

Permalink
Add release GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xcmd-io committed Sep 5, 2023
1 parent f9c1f35 commit a385e9d
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/rust.yaml → .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: test

name: Build
on:
push:
branches:
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Release
on:
push:
branches:
- gh-release
# push:
# tags:
# - 'v*'
# workflow_dispatch:

jobs:
release:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-20.04, windows-latest]
runs-on: ${{ matrix.platform }}

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
run: |
sudo apt-get update --fix-missing
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
- name: Rust setup
uses: dtolnay/rust-toolchain@stable

- name: Rust cache
uses: swatinem/rust-cache@v2

- name: Sync node version and setup cache
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: npm
cache-dependency-path: '**/package-lock.json'

- name: Install frontend dependencies
working-directory: xcmd-tauri
run: npm install

- name: Build the app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with:
tagName: test # ${{ github.ref_name }} # This only works if your workflow triggers on new tags.
projectPath: xcmd-tauri
releaseName: 'Cross Commander v__VERSION__'
releaseBody: 'See the assets to download and install this version.'
releaseDraft: true
prerelease: false
21 changes: 21 additions & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion xcmd-tauri/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tauri-build = { version = "1.4.0", features = [] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.4.1", features = ["api-all"] }
tauri = { version = "1.4.1", features = [ "updater", "api-all"] }

[features]
# by default Tauri runs in production mode
Expand Down
7 changes: 6 additions & 1 deletion xcmd-tauri/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@
"csp": null
},
"updater": {
"active": false
"active": true,
"endpoints": [

],
"dialog": true,
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEZDQkZDREVGRkVBQ0RBRDMKUldUVDJxeis3ODIvL0pHRHZkQTlONVpXZzRXNjhGWTdybkZtWFJzdEtHK1NRaVJIaEZuaHVIM3gK"
},
"windows": [
{
Expand Down
23 changes: 23 additions & 0 deletions xcmd-tauri/src-tauri/tauri.update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"version": "v0.1.0",
"notes": "Initial version",
"pub_date": "2023-09-04T23:41:49.361Z",
"platforms": {
"darwin-x86_64": {
"signature": "Content of app.tar.gz.sig",
"url": "https://github.com/xcmd-io/xcmd/releases/download/v0.1.0/app-x86_64.app.tar.gz"
},
"darwin-aarch64": {
"signature": "Content of app.tar.gz.sig",
"url": "https://github.com/xcmd-io/xcmd/releases/download/v0.1.0/app-aarch64.app.tar.gz"
},
"linux-x86_64": {
"signature": "Content of app.AppImage.tar.gz.sig",
"url": "https://github.com/xcmd-io/xcmd/releases/download/v0.1.0/app-amd64.AppImage.tar.gz"
},
"windows-x86_64": {
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVUVDJxeis3ODIvL0V5Tk5HV1dUNWNrNVpaVTJFbFJPNkQzR2NiR3Q2cXB0ZGdsaFl1R0h6YSttbllVbjNldE1NVXFpRW92Z01xMkZFQnAraG5POVpNYUxQYWJnWnptVXdZPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNjkzODcwMTEwCWZpbGU6eGNtZF8wLjEuMF94NjRfZW4tVVMubXNpLnppcAp0bHkyRDhVc0dzbHFyajVVYm82N1ltejVReHM5VitJL1pheHpjZEdseCtmRE9RcmNkUHpHZlhjYk9KNWdGNWcyUk1BVTdxTzlBZEZyNXptUytPWnhDQT09Cg==",
"url": "https://github.com/xcmd-io/xcmd/releases/download/v0.1.0/xcmd_0.1.0_x64_en-US.msi"
}
}
}

0 comments on commit a385e9d

Please sign in to comment.