chore: fix version

This commit is contained in:
DIYgod
2024-07-11 14:44:33 +08:00
parent ef65c42501
commit 7c597e1c3d
2 changed files with 10 additions and 14 deletions
+8 -2
View File
@@ -7,8 +7,14 @@ outputs:
runs:
using: 'composite'
steps:
- name: 'Get Version'
- name: 'Write Version'
id: version
shell: bash
run: |
APP_VERSION=$(node -p "require('./package.json').version")
if [ "${{ github.ref_type }}" == "tag" ]; then
APP_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
else
APP_VERSION=$(node -p "require('./package.json').version")
fi
echo $APP_VERSION
echo "APP_VERSION=$APP_VERSION" >> "$GITHUB_OUTPUT"
+2 -12
View File
@@ -3,16 +3,6 @@ name: Build
on:
push:
workflow_dispatch:
inputs:
build-type:
description: 'Build Type'
type: choice
required: true
default: canary
options:
- internal
- beta
- stable
env:
VITE_WEB_URL: ${{ vars.VITE_WEB_URL }}
@@ -20,7 +10,7 @@ env:
VITE_IMGPROXY_URL: ${{ vars.VITE_IMGPROXY_URL }}
VITE_SENTRY_DSN: ${{ vars.VITE_SENTRY_DSN }}
VITE_POSTHOG_KEY: ${{ vars.VITE_POSTHOG_KEY }}
VITE_BUILD_TYPE: ${{ github.event.inputs.build-type || 'internal' }}
VITE_BUILD_TYPE: internal
jobs:
release:
@@ -116,7 +106,7 @@ jobs:
uses: ./.github/actions/setup-version
- name: Create Release Draft
if: github.event_name == 'workflow_dispatch'
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v2
with:
name: v${{ steps.version.outputs.APP_VERSION }}