mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-19 22:24:17 +01:00
Cleaner deployment
This commit is contained in:
10
.github/workflows/deploy1.yml
vendored
10
.github/workflows/deploy1.yml
vendored
@@ -18,13 +18,14 @@ jobs:
|
|||||||
ref: "master"
|
ref: "master"
|
||||||
token: "${{ secrets.GH_PAT }}"
|
token: "${{ secrets.GH_PAT }}"
|
||||||
# Check that the tag commit is the latest master commit
|
# Check that the tag commit is the latest master commit
|
||||||
- run: |
|
- id: check_recursive
|
||||||
|
run: |
|
||||||
git fetch --tags
|
git fetch --tags
|
||||||
tag_commit=$(git rev-parse ${{ github.ref }})
|
tag_commit=$(git rev-parse ${{ github.ref }})
|
||||||
master_commit=$(git rev-parse master)
|
master_commit=$(git rev-parse master)
|
||||||
if [ "$tag_commit" != "$master_commit" ]; then
|
if [ "$tag_commit" != "$master_commit" ]; then
|
||||||
echo "The tag commit ($tag_commit) is not the latest master commit ($master_commit)"
|
echo "::warning ::The tag commit $tag_commit does not match the latest master commit $master_commit. This is probably a recursive tag push that will be ignored."
|
||||||
exit 1
|
echo "skip=true" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
- run: "echo 'CLEAN_VERSION=${{ github.ref }}' | sed 's,refs/tags/v,,g' >> $GITHUB_ENV"
|
- run: "echo 'CLEAN_VERSION=${{ github.ref }}' | sed 's,refs/tags/v,,g' >> $GITHUB_ENV"
|
||||||
# Write the new version to package.json
|
# Write the new version to package.json
|
||||||
@@ -38,7 +39,8 @@ jobs:
|
|||||||
cache: "poetry"
|
cache: "poetry"
|
||||||
- run: "poetry version $CLEAN_VERSION"
|
- run: "poetry version $CLEAN_VERSION"
|
||||||
# Commit the changes and move the tag!
|
# Commit the changes and move the tag!
|
||||||
- run: |
|
- if: "steps.check_recursive.outputs.skip != 'true'"
|
||||||
|
run: |
|
||||||
git config --global user.email "yeicor@users.noreply.github.com"
|
git config --global user.email "yeicor@users.noreply.github.com"
|
||||||
git config --global user.name "Yeicor"
|
git config --global user.name "Yeicor"
|
||||||
if git commit -am "Automatically update version to $CLEAN_VERSION"; then
|
if git commit -am "Automatically update version to $CLEAN_VERSION"; then
|
||||||
|
|||||||
Reference in New Issue
Block a user