Skip to content

chore: release v0.1.1 version update #1

chore: release v0.1.1 version update

chore: release v0.1.1 version update #1

Workflow file for this run

name: 'publish'
on:
push:
tags:
- '*' # Only run on tag pushes.
env:
APP_NAME: "Super-Note"
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build changelog
id: build_changelog
run: |
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:
environment: production
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
# Windows Desktop Build
- os: windows-latest
rust-target: ''
tauri-args: ''
type: 'desktop'
# macOS ARM Build
- os: macos-latest
rust-target: 'aarch64-apple-darwin'
tauri-args: '--target aarch64-apple-darwin'
type: 'desktop'
# macOS Intel Build
- os: macos-latest
rust-target: 'x86_64-apple-darwin'
tauri-args: '--target x86_64-apple-darwin'
type: 'desktop'
# Linux Desktop Build
- os: ubuntu-22.04
rust-target: ''
tauri-args: '--bundles deb,rpm,updater'
type: 'desktop'
# Android Build
- os: ubuntu-latest
rust-target: 'aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android'
tauri-args: ''
type: 'android'
runs-on: ${{ matrix.os }}
needs: [changelog]
steps:
- uses: actions/checkout@v4
- name: setup Android signing
if: matrix.type == 'android'
run: |
cd src-tauri/gen/android
echo "keyAlias=${{ secrets.ANDROID_RELEASE_KEY }}" > keystore.properties
echo "password=${{ secrets.ANDROID_RELEASE_PASSWORD }}" >> keystore.properties
base64 -d <<< "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" > $RUNNER_TEMP/uploadkeystore.jks
echo "storeFile=$RUNNER_TEMP/uploadkeystore.jks" >> keystore.properties
- uses: pnpm/action-setup@v4
with:
version: 8
- name: Setup Java
if: matrix.type == 'android'
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Android SDK
if: matrix.type == 'android'
uses: android-actions/setup-android@v3
- name: Install NDK
if: matrix.type == 'android'
run: sdkmanager "ndk;27.0.11902837"
- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: install Bun (Desktop only)
if: matrix.type == 'desktop'
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: setup Python (Desktop only)
if: matrix.type == 'desktop'
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: install PyInstaller (Desktop only)
if: matrix.type == 'desktop'
run: pip install pyinstaller
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.rust-target }}
- name: install dependencies (ubuntu only)
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y build-essential libssl-dev libgtk-3-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libfuse2 libjavascriptcoregtk-4.1-dev libsoup-3.0-dev file
- name: install frontend dependencies
run: pnpm install
- name: Build Tauri app
if: matrix.type == 'desktop'
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
# Compatibility with some versions of the action
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
APPIMAGE_EXTRACT_AND_RUN: 1
with:
tagName: ${{ github.ref_name }}
releaseName: "${{ env.APP_NAME }} ${{ github.ref_name }}"
releaseBody: |
${{needs.changelog.outputs.changelog}}
See the assets to download this version and install.
releaseDraft: false
prerelease: false
args: ${{ matrix.tauri-args }}
includeUpdaterJson: ${{ matrix.upload-updater || false }}
- name: Extract version from tag
if: matrix.type == 'android'
id: package-version
run: echo "current-version=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
- name: Build app bundle
if: matrix.type == 'android'
run: pnpm tauri android build -v
env:
NDK_HOME: ${{ env.ANDROID_HOME }}/ndk/27.0.11902837
- name: Rename APK file
if: matrix.type == 'android'
run: |
# Create a guaranteed safe destination folder
mkdir -p ./src-tauri/gen/android/app/build/outputs/apk/final_release
# Find any APK generated and move it there with the new name
find ./src-tauri/gen/android/app/build/outputs/apk/ -type f -name "*.apk" -exec mv {} ./src-tauri/gen/android/app/build/outputs/apk/final_release/${{ env.APP_NAME }}-${{ steps.package-version.outputs.current-version }}.apk \;
- name: Build Android App Bundle
if: matrix.type == 'android'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: "${{ env.APP_NAME }} ${{ github.ref_name }}"
draft: false
prerelease: false
files: |
./src-tauri/gen/android/app/build/outputs/apk/final_release/${{ env.APP_NAME }}-${{ steps.package-version.outputs.current-version }}.apk