Skip to content

Commit

Permalink
feat: semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
c0rydoras committed Mar 8, 2024
1 parent 4a57b71 commit 4e5ee2c
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 63 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/assets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
name: Build Assets
on:
release:
types: [created]

env:
RUSTFLAGS: "-Dwarnings"
CARGO_TERM_COLOR: always

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

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

- uses: cardinalby/git-get-release-action@v1
id: get-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitSha: ${{ github.sha }}
prerelease: false

- name: Install webkit2gtk (ubuntu only)

if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: latest

- name: Setup node and Cache .pnpm-store
uses: actions/setup-node@v4
with:
node-version: latest
cache: "pnpm"

- name: Rust setup
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal

- name: Set up cargo cache
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- name: Install cargo-edit
uses: actions-rs/[email protected]
with:
crate: cargo-edit
version: latest
use-tool-cache: true

- name: Adjust Version
working-directory: src-tauri
run: |
cargo set-version "$(echo ${{ github.ref_name }} | sed s/v// )"
- name: Install dependencies
run: pnpm install

- name: Build 🔧
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
releaseId: ${{ steps.get-release.outputs.id }}
tauriScript: "pnpm"
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CI
---
name: ci
on:
pull_request:
branches:
Expand Down
57 changes: 0 additions & 57 deletions .github/workflows/publish.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Semantic Release

on:
push:
branches:
- main
workflow_call:
secrets:
PAT:
required: true

jobs:
release:
name: Semantic Release

runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Semantic Release
uses: go-semantic-release/action@v1
id: semrel
with:
allow-initial-development-versions: true
github-token: ${{ secrets.PAT }}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vault-gui",
"version": "1.0.0",
"version": "0.0.0",
"author": "c0rydoras",
"contributors": [
{
Expand Down Expand Up @@ -54,4 +54,4 @@
"solid-js": "1.8.11",
"solid-toast": "^0.5.0"
}
}
}
2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vault-gui"
version = "0.1.0"
version = "0.0.0"
description = "A Tauri App for using Hashicorps Vault"
authors = ["c0rydoras", "Gian Klug <[email protected]>"]
license = "MIT"
Expand Down
3 changes: 1 addition & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"distDir": "../dist"
},
"package": {
"productName": "VaultGUI",
"version": "0.1.0"
"productName": "vault-gui"
},
"tauri": {
"allowlist": {
Expand Down

0 comments on commit 4e5ee2c

Please sign in to comment.