mirror of
https://github.com/swartzrock/obsidian-settings-float-plugin.git
synced 2026-07-22 07:48:42 +00:00
updated the publish workflow to match the numeric versions in the json files
This commit is contained in:
parent
bd8d946938
commit
7587e9a94f
1 changed files with 22 additions and 3 deletions
25
.github/workflows/publish.yml
vendored
25
.github/workflows/publish.yml
vendored
|
|
@ -3,11 +3,20 @@ name: Publish Release
|
|||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
- "0*"
|
||||
- "1*"
|
||||
- "2*"
|
||||
- "3*"
|
||||
- "4*"
|
||||
- "5*"
|
||||
- "6*"
|
||||
- "7*"
|
||||
- "8*"
|
||||
- "9*"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Release tag to create, for example v0.1.0. Defaults to manifest version."
|
||||
description: "Release tag to create, for example 0.1.0. Defaults to manifest version."
|
||||
required: false
|
||||
type: string
|
||||
|
||||
|
|
@ -57,10 +66,20 @@ jobs:
|
|||
if [ "${GITHUB_EVENT_NAME}" = "workflow_dispatch" ]; then
|
||||
TAG_NAME="${INPUT_TAG}"
|
||||
if [ -z "${TAG_NAME}" ]; then
|
||||
TAG_NAME="v${VERSION}"
|
||||
TAG_NAME="${VERSION}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ! "${TAG_NAME}" =~ ^[0-9] ]]; then
|
||||
echo "::error::Release tag must start with a digit and match manifest.json version (${VERSION})."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${TAG_NAME}" != "${VERSION}" ]; then
|
||||
echo "::error::Release tag (${TAG_NAME}) must match manifest.json version (${VERSION})."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "version=${VERSION}" >> "${GITHUB_OUTPUT}"
|
||||
echo "tag_name=${TAG_NAME}" >> "${GITHUB_OUTPUT}"
|
||||
echo "zip_name=settings-float-${VERSION}.zip" >> "${GITHUB_OUTPUT}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue