Skip to content

Commit a7614ea

Browse files
committed
Updated master workflow files
1 parent dfd691b commit a7614ea

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

.github/workflows/deb-release.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,25 @@ jobs:
2020
uses: actions/checkout@v2.3.4
2121
with:
2222
submodules: true
23+
fetch-depth: 0
2324

24-
- id: version
25-
uses: docker://lpenz/ghaction-version-gen:0.3
2625

27-
# TODO: move this to a new action
28-
# (use Docker for pre-installing 'dpkg-dev')
29-
- name: Confirm version is higher than last tagged version
26+
- name: Get latest semver tag and latest version in changelog
3027
run: |
3128
set -x
32-
sudo apt install -y dpkg-dev
33-
latest_tag=${{ steps.version.outputs.tag_latest }}
34-
latest_version=$(dpkg-parsechangelog -Sversion)
35-
dpkg --compare-versions ${latest_version} gt ${latest_tag#v}
36-
echo "CURRENT_VERSION=${latest_version}" >> $GITHUB_ENV
29+
30+
sudo apt install -y --no-install-recommends dpkg-dev npm
31+
npm install -g git-latest-semver-tag
32+
33+
latest_tag=$(git-latest-semver-tag)
34+
changelog_version=$(dpkg-parsechangelog -Sversion)
35+
36+
echo "LATEST_TAG=${latest_tag#v}" >> $GITHUB_ENV
37+
echo "CURRENT_VERSION=${changelog_version}" >> $GITHUB_ENV
38+
39+
- name: Confirm version is higher than last tagged version
40+
if: ${{ env.LATEST_TAG != '' }}
41+
run: dpkg --compare-versions ${{ env.CURRENT_VERSION }} gt ${{ env.LATEST_TAG }}
3742

3843
- name: Determine architecture to use from package info
3944
# If architecture is 'all', then it can be compiled on host architecture

0 commit comments

Comments
 (0)