mirror of
https://github.com/RSSNext/Folo.git
synced 2026-10-22 08:26:43 +08:00
42d39fdd22
- Updated the version setup action to handle new tag formats for desktop and mobile releases. - Introduced a new script to extract release information from commit messages, improving the tagging process. - Modified workflows to create tags in the format of `desktop/v1.2.3` and `mobile/v1.2.3`. - Enhanced the updater logic to accommodate the new tagging structure and ensure proper release handling. Signed-off-by: Innei <tukon479@gmail.com>
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
name: Setup Version
|
|
description: "Setup Version"
|
|
inputs:
|
|
type:
|
|
required: true
|
|
description: "Type of the app, either 'desktop' or 'mobile'"
|
|
default: "desktop"
|
|
outputs:
|
|
APP_VERSION:
|
|
description: "App Version"
|
|
value: ${{ steps.version.outputs.APP_VERSION }}
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: "Write Version"
|
|
id: version
|
|
shell: bash
|
|
run: |
|
|
if [ "${{ github.ref_type }}" == "tag" ]; then
|
|
# Handle new tag format: desktop/v1.2.3 or mobile/v1.2.3
|
|
if [[ "${{ github.ref_name }}" =~ ^(desktop|mobile)/v(.*)$ ]]; then
|
|
APP_VERSION="${BASH_REMATCH[2]}"
|
|
else
|
|
# Fallback for old format: v1.2.3
|
|
APP_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
|
|
fi
|
|
else
|
|
if [ "${{ inputs.type }}" == "desktop" ]; then
|
|
APP_VERSION=$(node -p "require('./apps/desktop/package.json').version")
|
|
else
|
|
APP_VERSION=$(node -p "require('./apps/mobile/package.json').version")
|
|
fi
|
|
fi
|
|
echo $APP_VERSION
|
|
echo "APP_VERSION=$APP_VERSION" >> "$GITHUB_OUTPUT"
|