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:
parent
07fb3a9a7a
commit
4a769e6a7f
2 changed files with 12 additions and 3 deletions
5
.github/actions/get-version/action.yml
vendored
5
.github/actions/get-version/action.yml
vendored
|
|
@ -7,4 +7,9 @@ runs:
|
||||||
steps:
|
steps:
|
||||||
- run: |
|
- 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
|
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
|
shell: bash
|
||||||
|
|
|
||||||
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
|
|
@ -246,7 +246,7 @@ jobs:
|
||||||
if: ${{ runner.os != 'Linux' }}
|
if: ${{ runner.os != 'Linux' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
python ./scripts/package.py --package-version ${{env.DESKFLOW_VERSION}}
|
python ./scripts/package.py --package-version ${{env.DESKFLOW_PACKAGE_VERSION}}
|
||||||
mv dist/deskflow* build/
|
mv dist/deskflow* build/
|
||||||
env:
|
env:
|
||||||
WINDOWS_PFX_CERTIFICATE: ${{ secrets.WINDOWS_PFX }}
|
WINDOWS_PFX_CERTIFICATE: ${{ secrets.WINDOWS_PFX }}
|
||||||
|
|
@ -308,6 +308,10 @@ jobs:
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
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
|
- name: Deploy continuous
|
||||||
if: (github.ref == 'refs/heads/master') && !(contains(github.ref, '/tags/v'))
|
if: (github.ref == 'refs/heads/master') && !(contains(github.ref, '/tags/v'))
|
||||||
uses: crowbarmaster/GH-Automatic-Releases@latest
|
uses: crowbarmaster/GH-Automatic-Releases@latest
|
||||||
|
|
@ -315,7 +319,7 @@ jobs:
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
automatic_release_tag: "continuous"
|
automatic_release_tag: "continuous"
|
||||||
prerelease: true
|
prerelease: true
|
||||||
title: "Continuous Build"
|
title: "Continuous Build: ${{env.DESKFLOW_VERSION}}"
|
||||||
files: |
|
files: |
|
||||||
package-*/*
|
package-*/*
|
||||||
|
|
||||||
|
|
@ -342,5 +346,5 @@ jobs:
|
||||||
- name: Submit
|
- name: Submit
|
||||||
uses: ./.github/actions/winget-publish
|
uses: ./.github/actions/winget-publish
|
||||||
with:
|
with:
|
||||||
release-version: ${{env.DESKFLOW_VERSION}}
|
release-version: ${{env.DESKFLOW_PACKAGE_VERSION}}
|
||||||
token: ${{ secrets.WINGET_DEPLOY_TOKEN }}
|
token: ${{ secrets.WINGET_DEPLOY_TOKEN }}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue