ci: get-version action new DESKFLOW_PACKAGE_VERSION returns "continuous" when not a v* tag otherwise the tag
DESKFLOW_VERSION is the version described by git
This commit is contained in:
committed by
Chris Rizzitello
parent
07fb3a9a7a
commit
4a769e6a7f
5
.github/actions/get-version/action.yml
vendored
5
.github/actions/get-version/action.yml
vendored
@ -7,4 +7,9 @@ runs:
|
||||
steps:
|
||||
- run: |
|
||||
echo "DESKFLOW_VERSION=$(git describe --long | sed 's/-/./g;s/v//g' | grep -o '^[0-9]*.[0-9]*.[0-9]*.[0-9]*')">> $GITHUB_ENV
|
||||
if [[ "$GITHUB_REF" == *"tags/v"* ]]; then
|
||||
echo "DESKFLOW_PACKAGE_VERSION=$(echo $GITHUB_REF | sed 's/v//g')">> $GITHUB_ENV
|
||||
else
|
||||
echo "DESKFLOW_PACKAGE_VERSION=continuous">> $GITHUB_ENV
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@ -246,7 +246,7 @@ jobs:
|
||||
if: ${{ runner.os != 'Linux' }}
|
||||
shell: bash
|
||||
run: |
|
||||
python ./scripts/package.py --package-version ${{env.DESKFLOW_VERSION}}
|
||||
python ./scripts/package.py --package-version ${{env.DESKFLOW_PACKAGE_VERSION}}
|
||||
mv dist/deskflow* build/
|
||||
env:
|
||||
WINDOWS_PFX_CERTIFICATE: ${{ secrets.WINDOWS_PFX }}
|
||||
@ -308,6 +308,10 @@ jobs:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
- name: Get version
|
||||
if: (github.ref == 'refs/heads/master') && !(contains(github.ref, '/tags/v'))
|
||||
uses: ./.github/actions/get-version
|
||||
|
||||
- name: Deploy continuous
|
||||
if: (github.ref == 'refs/heads/master') && !(contains(github.ref, '/tags/v'))
|
||||
uses: crowbarmaster/GH-Automatic-Releases@latest
|
||||
@ -315,7 +319,7 @@ jobs:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
automatic_release_tag: "continuous"
|
||||
prerelease: true
|
||||
title: "Continuous Build"
|
||||
title: "Continuous Build: ${{env.DESKFLOW_VERSION}}"
|
||||
files: |
|
||||
package-*/*
|
||||
|
||||
@ -342,5 +346,5 @@ jobs:
|
||||
- name: Submit
|
||||
uses: ./.github/actions/winget-publish
|
||||
with:
|
||||
release-version: ${{env.DESKFLOW_VERSION}}
|
||||
release-version: ${{env.DESKFLOW_PACKAGE_VERSION}}
|
||||
token: ${{ secrets.WINGET_DEPLOY_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user