Skip to content

feat: automate version setting in release workflow and update version… #13

feat: automate version setting in release workflow and update version…

feat: automate version setting in release workflow and update version… #13

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
- os: windows-latest
runs-on: ${{ matrix.os }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust build
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri -> target
- name: Set version from tag
shell: bash
run: |
VERSION="${GITHUB_REF_NAME#v}"
jq --arg v "$VERSION" '.version = $v' src-tauri/tauri.conf.json > tmp.json && mv tmp.json src-tauri/tauri.conf.json
- name: Install frontend dependencies
run: npm install
- name: Build and upload to release
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ github.ref_name }}
releaseName: Stack ${{ github.ref_name }}
releaseBody: |
Visit [stack.swendl.com](https://stack.swendl.com) for more information.
releaseDraft: false
prerelease: false