File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -20,20 +20,25 @@ jobs:
20
20
uses : actions/checkout@v2.3.4
21
21
with :
22
22
submodules : true
23
+ fetch-depth : 0
23
24
24
- - id : version
25
- uses : docker://lpenz/ghaction-version-gen:0.3
26
25
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
30
27
run : |
31
28
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 }}
37
42
38
43
- name : Determine architecture to use from package info
39
44
# If architecture is 'all', then it can be compiled on host architecture
You can’t perform that action at this time.
0 commit comments