publish only production versions to winget

This commit is contained in:
Armin Schrenk
2022-11-21 22:10:06 +01:00
parent 9d9f118a32
commit 83af5e796f

View File

@@ -24,6 +24,11 @@ jobs:
runs-on: windows-latest
env:
LOOPBACK_ALIAS: 'cryptomator-vault'
outputs:
semVerNum: ${{ steps.versions.outputs.semVerNum }}
semVerStr: ${{ steps.versions.outputs.semVerStr }}
revNum: ${{ steps.versions.outputs.revNum }}
isProductionVersion: ${{ steps.versions.outputs.isProductionVersion}}
steps:
- uses: actions/checkout@v3
with:
@@ -34,7 +39,7 @@ jobs:
distribution: ${{ env.JAVA_DIST }}
java-version: ${{ env.JAVA_VERSION }}
cache: ${{ env.JAVA_CACHE }}
- id: versions
- id: versions
name: Apply version information
run: |
if [[ $GITHUB_REF =~ refs/tags/[0-9]+\.[0-9]+\.[0-9]+.* ]]; then
@@ -48,9 +53,14 @@ jobs:
fi
SEM_VER_NUM=`echo ${SEM_VER_STR} | sed -E 's/([0-9]+\.[0-9]+\.[0-9]+).*/\1/'`
REVCOUNT=`git rev-list --count HEAD`
PRODUCTION_READY_VERSION="false"
if [[ $SEM_VER_STR =~ [0-9]+\.[0-9].[0-9]+ ]]; then
PRODUCTION_READY_VERSION="true"
fi
echo "::set-output name=semVerStr::${SEM_VER_STR}"
echo "::set-output name=semVerNum::${SEM_VER_NUM}"
echo "::set-output name=revNum::${REVCOUNT}"
echo "::set-output name=isProductionVersion::${PRODUCTION_READY_VERSION}"
- name: Validate Version
uses: skymatic/semver-validation-action@v1
with:
@@ -199,17 +209,14 @@ jobs:
files: |
*.msi
*.asc
outputs:
semVerNum: ${{ steps.versions.outputs.semVerNum }}
semVerStr: ${{ steps.versions.outputs.semVerStr }}
revNum: ${{ steps.versions.outputs.revNum }}
call-winget-flow:
needs: [build-msi]
if: github.event.action == 'published'
if: github.event.action == 'published' && needs.build-msi.outputs.isProductionVersion
uses: ./.github/workflows/winget.yml
with:
releaseTag: ${{ github.event.release.tag_name }}
secrets: inherit
build-exe: