Skip to content

Merge pull request #22 from Brender-Studio/development #21

Merge pull request #22 from Brender-Studio/development

Merge pull request #22 from Brender-Studio/development #21

Workflow file for this run

permissions: write-all
name: Publish Release
on:
push:
# branches:
# - main
tags:
- "v*"
workflow_dispatch:
env:
APP_NAME: "Brender Studio"
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build changelog
id: build_changelog
run: |
# NOTE: if commits subjects are standardized, you can filter the git log based on feat: and fix:
# and then replace "feat:" with "New: " and "fix:" with "Fixed "
# when AI gets good, we can also summarized commits into a bullet point list
PREV_TAG=$(git tag --list v* | tail -n2 | head -n1)
echo "changelog=$(git log $PREV_TAG...${{ github.ref_name }} --pretty=format:"- %s")" >> $GITHUB_OUTPUT
outputs:
changelog: ${{ steps.build_changelog.outputs.changelog }}
release:
strategy:
fail-fast: false
matrix:
# platform: [macos-latest, ubuntu-latest, windows-latest]
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 build.
args: '--target universal-apple-darwin'
- platform: 'ubuntu-latest' # for Tauri v1 you could replace this with ubuntu-20.04.
args: ''
- platform: 'windows-latest'
args: ''
runs-on: ${{ matrix.platform }}
needs: changelog
steps:
- name: Checkout repository
uses: actions/checkout@v4
# build the changelog based on the commit messages between the versioned tags
- name: Setup Node.js
uses: actions/setup-node@v4
# NOTE: enterprise developers may hard code a version
with:
node-version: '20.10.0'
# node-version-file: '.nvmrc'
- name: Setup Rust
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' || '' }}
# run: |
# rustup update --no-self-update
- name: Install Ubuntu dependencies
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt update
xargs sudo apt install -y < environment/apt_packages.txt
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Build frontend
run: npm run build
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
# if u get Error: Resource not accessible by integration
# go to repository Settings => Action => General => Workflow permissions => Switch to Read and Write permisions
env:
CI: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
with:
# tauri-action replaces \_\_VERSION\_\_ with the app version
tagName: ${{ github.ref_name }}
releaseName: "${{ env.APP_NAME }} v__VERSION__"
releaseBody: |
${{needs.changelog.outputs.changelog}}
See the assets to download this version and install.
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}