Skip to content

build(deps): bump rsa from 0.9.7 to 0.9.10 in the cargo group across 1 directory #67

build(deps): bump rsa from 0.9.7 to 0.9.10 in the cargo group across 1 directory

build(deps): bump rsa from 0.9.7 to 0.9.10 in the cargo group across 1 directory #67

Workflow file for this run

name: ci_cd
on:
pull_request:
types: [opened, reopened, synchronize]
branches:
- main
workflow_dispatch:
inputs:
release:
description: "True to build and publish a new release, including an automatic version increase"
required: false
type: boolean
env:
ARTIFACT_NAME_VERSION: pr-hub-version
jobs:
# Ensure code quality against set rules
validate-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: install frontend dependencies
run: pnpm install
- name: frontend linter check
run: pnpm lint
- name: frontend formatter check
run: pnpm check-format
# Automatically determine the next semver and store it as artifact
determine-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install GitVersion
uses: gittools/actions/gitversion/setup@v3.0.2
with:
versionSpec: "5.x"
- name: determine version
uses: gittools/actions/gitversion/execute@v3.0.2
with:
useConfigFile: true
configFilePath: GitVersion.yml
- name: store version
run: |
mkdir dist
echo "$GitVersion_FullSemVer" > ./dist/version.txt
- name: publish version artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME_VERSION }}
path: dist
# This job is taken from here:
# https://github.com/tauri-apps/tauri-action/blob/045ee3f8d86eeb363341a7fd543e7e6a8a282b87/examples/test-build-only.yml
# It ensures that the tauri app can be build for all targeted platforms
build-tauri:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- platform: "macos-latest"
args: "--target aarch64-apple-darwin"
- platform: "macos-latest"
args: "--target x86_64-apple-darwin"
- platform: "ubuntu-22.04"
args: ""
- platform: "windows-latest"
args: ""
runs-on: ${{ matrix.platform }}
needs: [validate-code, determine-version]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: install frontend dependencies
run: pnpm install
- name: generate models
run: ./scripts/prebuild.sh
shell: bash
# Set the detected version
- name: download version artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME_VERSION }}
path: dist
- name: Load version
run: echo "VERSION=$(cat ./dist/version.txt)" >> $GITHUB_ENV
shell: bash
- name: install cargo-edit
run: cargo install cargo-edit
- name: set new version
run: cargo set-version ${{ env.VERSION }}
shell: bash
# Build for validation if the action input for release is false
- name: build tauri app
uses: tauri-apps/tauri-action@v0
if: ${{ inputs.release == false }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: ${{ matrix.args }}
# Build and release if the action input for release is true
- name: build and release tauri app
uses: tauri-apps/tauri-action@v0
if: ${{ inputs.release == true }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: app-v__VERSION__
releaseName: "App v__VERSION__"
releaseBody: "See the assets to download this version and install."
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}