Skip to content

Commit

Permalink
Use git-latest-semver-tag for release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
web-flow committed Sep 2, 2021
1 parent 4fa6649 commit aa5d04a
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/deb-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,22 @@ jobs:
with:
submodules: true

- id: version
uses: docker://lpenz/ghaction-version-gen:0.3

# TODO: move this to a new action
# (use Docker for pre-installing 'dpkg-dev')
- name: Confirm version is higher than last tagged version
- name: Get latest semver tag and latest version in changelog
run: |
set -x
sudo apt install -y dpkg-dev
latest_tag=${{ steps.version.outputs.tag_latest }}
latest_version=$(dpkg-parsechangelog -Sversion)
dpkg --compare-versions ${latest_version} gt ${latest_tag#v}
echo "CURRENT_VERSION=${latest_version}" >> $GITHUB_ENV
sudo apt install -y --no-install-recommends dpkg-dev npm
npm install -g git-latest-semver-tag
latest_tag=$(git-latest-semver-tag)
changelog_version=$(dpkg-parsechangelog -Sversion)
echo "LATEST_TAG=${latest_tag#v}" >> $GITHUB_ENV
echo "CURRENT_VERSION=${changelog_version}" >> $GITHUB_ENV
- name: Confirm version is higher than last tagged version
if: ${{ env.LATEST_TAG != '' }}
run: dpkg --compare-versions ${{ env.CURRENT_VERSION }} gt ${{ env.LATEST_TAG }}

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

0 comments on commit aa5d04a

Please sign in to comment.