-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c436218
commit 0898678
Showing
2 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Check Version in Script | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
verify-version: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout del repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Estrai la versione dal tag | ||
- name: Extract version from tag | ||
id: extract_tag | ||
run: echo "TAG_VERSION=${GITHUB_REF_NAME#refs/tags/}" >> $GITHUB_ENV | ||
|
||
# Controlla la versione nello script | ||
- name: Verify script version matches tag | ||
id: check_version | ||
run: | | ||
# Estrai la versione dallo script | ||
SCRIPT_VERSION=$(grep '^VERSION=' laravel-sync | cut -d'"' -f2) | ||
# Confronta le versioni | ||
if [ "$SCRIPT_VERSION" != "$TAG_VERSION" ]; then | ||
echo "Version mismatch: Script VERSION=$SCRIPT_VERSION, Tag VERSION=$TAG_VERSION" | ||
exit 1 | ||
fi | ||
echo "Script version matches tag version: $SCRIPT_VERSION" | ||
# Passaggio opzionale per notificare il successo (puoi personalizzarlo o eliminarlo) | ||
- name: Notify success | ||
if: success() | ||
run: echo "Version check passed successfully!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters