Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Александр Изотов committed Aug 2, 2024
1 parent 34e4713 commit a064558
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ jobs:
EPOCH_TIME=$(date +%s)
COMMIT_HASH=$(git rev-parse --short HEAD)
VERSION="${EPOCH_TIME}-${COMMIT_HASH}"
RPM_VERSION=$(echo $VERSION | sed 's/-/_/g')
else
VERSION=$TAG
RPM_VERSION=$(echo $VERSION | sed 's/-/_/g')
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "rpm_version=$RPM_VERSION" >> $GITHUB_OUTPUT
- name: Upload build artifact
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -72,11 +75,11 @@ jobs:

- name: Build .rpm package
run: |
VERSION=${{ steps.get_version.outputs.version }}
fpm -s dir -t rpm -n print-pdf -v $VERSION -C package usr/local/bin usr/share/applications
RPM_VERSION=${{ steps.get_version.outputs.rpm_version }}
fpm -s dir -t rpm -n print-pdf -v $RPM_VERSION -C package usr/local/bin usr/share/applications
- name: Upload .rpm package
uses: actions/upload-artifact@v4
with:
name: print-pdf-rpm
path: print-pdf-${{ steps.get_version.outputs.version }}-1.x86_64.rpm
path: print-pdf-${{ steps.get_version.outputs.rpm_version }}.x86_64.rpm

0 comments on commit a064558

Please sign in to comment.