From 442ccce0713cd7739869f8f25a305ec27b5acaee Mon Sep 17 00:00:00 2001 From: Joe Kaufeld Date: Sat, 23 Jul 2022 15:26:10 -0400 Subject: [PATCH] switch to datetime --- .github/workflows/build_and_release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index eb1efc6..9e5bf01 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -18,20 +18,20 @@ jobs: - name: Install Env # this should be all we need because shiv will download the deps itself run: | + pip install --upgrade pip pip install shiv pip install poetry - # https://stackoverflow.com/a/64195658 - - name: Add SHORT_SHA env property with commit short sha - run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV + - name: Add CURRENT_TIME env property + run: echo "CURRENT_TIME=$(date -Iseconds)" >> $GITHUB_ENV - name: Build the sucker run: | - sed -i -e "s/?????/${{ env.SHORT_SHA }}/g" src/__init__.py + sed -i -e "s/?????/v${{ env.CURRENT_TIME }}/g" src/__init__.py make build - uses: ncipollo/release-action@v1 with: artifacts: "utils" body: "It's releasin' time" generateReleaseNotes: false - tag: ${{ env.SHORT_SHA }} + tag: v${{ env.CURRENT_TIME }} commit: master token: ${{ secrets.PAT }}