Version number must change as well as fonts must change to create a release. Otherwise, just a commit.
This commit is contained in:
parent
76e03cd93e
commit
74dd7a12f9
14
.github/workflows/publish-release.yml
vendored
14
.github/workflows/publish-release.yml
vendored
|
@ -23,13 +23,14 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(grep 'Version:' clique.sfd | awk '{print $2}' | sed 's/^0*//')
|
VERSION=$(grep 'Version:' clique.sfd | awk '{print $2}' | sed 's/^0*//')
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
PREVIOUS_VERSION=$(cat .github/workflows/previous_version.txt || echo "0")
|
mkdir -p .github/metadata
|
||||||
|
PREVIOUS_VERSION=$(cat .github/metadata/previous_version.txt || echo "0")
|
||||||
if [ "$VERSION" != "$PREVIOUS_VERSION" ]; then
|
if [ "$VERSION" != "$PREVIOUS_VERSION" ]; then
|
||||||
echo "changed=true" >> $GITHUB_ENV
|
echo "changed=true" >> $GITHUB_ENV
|
||||||
echo $VERSION > .github/workflows/previous_version.txt
|
echo $VERSION > .github/metadata/previous_version.txt
|
||||||
git config --global user.email "action@github.com"
|
git config --global user.email "action@github.com"
|
||||||
git config --global user.name "GitHub Action"
|
git config --global user.name "GitHub Action"
|
||||||
git add .github/workflows/previous_version.txt
|
git add .github/metadata/previous_version.txt
|
||||||
git commit -m "Update version to $VERSION"
|
git commit -m "Update version to $VERSION"
|
||||||
git push
|
git push
|
||||||
echo "::set-output name=changed::true"
|
echo "::set-output name=changed::true"
|
||||||
|
@ -41,13 +42,14 @@ jobs:
|
||||||
id: fonts_change
|
id: fonts_change
|
||||||
run: |
|
run: |
|
||||||
FONTS_HASH=$(find ./generated\ fonts/ -type f -exec md5sum {} \; | md5sum)
|
FONTS_HASH=$(find ./generated\ fonts/ -type f -exec md5sum {} \; | md5sum)
|
||||||
PREVIOUS_FONTS_HASH=$(cat .github/workflows/previous_fonts_hash.txt || echo "0")
|
mkdir -p .github/metadata
|
||||||
|
PREVIOUS_FONTS_HASH=$(cat .github/metadata/previous_fonts_hash.txt || echo "0")
|
||||||
if [ "$FONTS_HASH" != "$PREVIOUS_FONTS_HASH" ]; then
|
if [ "$FONTS_HASH" != "$PREVIOUS_FONTS_HASH" ]; then
|
||||||
echo "changed=true" >> $GITHUB_ENV
|
echo "changed=true" >> $GITHUB_ENV
|
||||||
echo $FONTS_HASH > .github/workflows/previous_fonts_hash.txt
|
echo $FONTS_HASH > .github/metadata/previous_fonts_hash.txt
|
||||||
git config --global user.email "action@github.com"
|
git config --global user.email "action@github.com"
|
||||||
git config --global user.name "GitHub Action"
|
git config --global user.name "GitHub Action"
|
||||||
git add .github/workflows/previous_fonts_hash.txt
|
git add .github/metadata/previous_fonts_hash.txt
|
||||||
git commit -m "Update fonts hash"
|
git commit -m "Update fonts hash"
|
||||||
git push
|
git push
|
||||||
echo "::set-output name=changed::true"
|
echo "::set-output name=changed::true"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user