Skip to content

Commit

Permalink
Fix date and commit difference in built packages
Browse files Browse the repository at this point in the history
  • Loading branch information
donhardman committed Oct 20, 2023
1 parent d5df8f7 commit 6e17d8e
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,29 @@ env:
COLUMNAR_VERSION: '2.2.1'

jobs:
vars:
runs-on: ubuntu-22.04
outputs:
app_version: ${{ steps.vars.outputs.app_version }}
app_date: ${{ steps.vars.outputs.app_date }}
app_commit: ${{ steps.vars.outputs.app_commit }}
rpm_suffix: ${{ steps.vars.outputs.rpm_suffix }}
deb_suffix: ${{ steps.vars.outputs.deb_suffix }}

steps:
- uses: actions/checkout@v3
- id: vars
run: |
version=$(<APP_VERSION)
date=$( date +%y%m%d%H )
commit=${GITHUB_SHA:0:7}
echo "app_version=$(echo ${{ github.ref_name }} | cut -dv -f2)" >> $GITHUB_OUTPUT
echo "app_date=$date" >> $GITHUB_OUTPUT
echo "app_commit=$commit" >> $GITHUB_OUTPUT
echo "rpm_suffix=_${date}.$commit" >> $GITHUB_OUTPUT
echo "deb_suffix=-${date}-$commit" >> $GITHUB_OUTPUT
build-artifact:
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -37,11 +60,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- id: vars
run: |
echo "app_version=$(echo ${{ github.ref_name }} | cut -dv -f2)" >> $GITHUB_OUTPUT
echo "rpm_suffix=_$( date +%y%m%d%H ).${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
echo "deb_suffix=-$( date +%y%m%d%H )-${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
- name: Set up QEMU
if: ${{ matrix.use_buildx == true }}
uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -104,11 +122,6 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- id: vars
run: |
echo "app_version=$(echo ${{ github.ref_name }} | cut -dv -f2)" >> $GITHUB_OUTPUT
echo "rpm_suffix=_$( date +%y%m%d%H ).${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
echo "deb_suffix=-$( date +%y%m%d%H )-${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
- name: Download artifact
uses: manticoresoftware/download_artifact_with_retries@main
with:
Expand Down Expand Up @@ -213,11 +226,6 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- id: vars
run: |
echo "app_version=$(echo ${{ github.ref_name }} | cut -dv -f2)" >> $GITHUB_OUTPUT
echo "rpm_suffix=_$( date +%y%m%d%H ).${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
echo "deb_suffix=-$( date +%y%m%d%H )-${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
- name: Download artifact
uses: manticoresoftware/download_artifact_with_retries@main
with:
Expand Down Expand Up @@ -329,11 +337,6 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- id: vars
run: |
echo "app_version=$(echo ${{ github.ref_name }} | cut -dv -f2)" >> $GITHUB_OUTPUT
echo "rpm_suffix=_$( date +%y%m%d%H ).${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
echo "deb_suffix=-$( date +%y%m%d%H )-${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT
- name: Prepare packages structure
run: |
mkdir -p .debpkg/usr/bin
Expand Down

0 comments on commit 6e17d8e

Please sign in to comment.