Skip to content

Commit

Permalink
I apologize for the error. The issue is that the Version field in the…
Browse files Browse the repository at this point in the history
… control file must start with a digit. You can adjust the workflow to ensure that the Version field starts with a digit by extracting the tag name from github.ref and stripping the leading 'v' (if it exists). Here's the corrected workflow:
  • Loading branch information
arran4 authored Oct 25, 2023
1 parent c4b6aef commit 43c3622
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,25 @@ jobs:
sudo apt-get install -y debhelper # Install debhelper for building the .deb package
shell: bash

- name: Get Tag Name
id: tag_name
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
shell: bash

- name: Build Debian Package
run: |
# Create the necessary directory structure
mkdir -p inotify-configurator/DEBIAN
mkdir -p inotify-configurator/etc/sysctl.d
# Get the tag name and remove the leading 'v' if it exists
TAG_NAME=${{ steps.tag_name.outputs.tag }}
TAG_NAME=${TAG_NAME#v}
# Create the control file
cat << EOF > inotify-configurator/DEBIAN/control
Package: Inotify-User-Instances-Limit-Configurator
Version: ${{ github.ref }}
Version: $TAG_NAME
Section: base
Priority: optional
Architecture: all
Expand All @@ -50,13 +59,13 @@ jobs:
dpkg-deb --build inotify-configurator
# Rename the .deb file with the appropriate version
mv inotify-configurator.deb "Inotify-User-Instances-Limit-Configurator-${{ github.ref }}.deb"
mv inotify-configurator.deb "Inotify-User-Instances-Limit-Configurator-${TAG_NAME}.deb"
shell: bash

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: ./Inotify-User-Instances-Limit-Configurator-${{ github.ref }}.deb
files: ./Inotify-User-Instances-Limit-Configurator-${TAG_NAME}.deb
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 43c3622

Please sign in to comment.