switch to datetime
This commit is contained in:
parent
c63b2a55ac
commit
442ccce071
10
.github/workflows/build_and_release.yml
vendored
10
.github/workflows/build_and_release.yml
vendored
@ -18,20 +18,20 @@ jobs:
|
|||||||
- name: Install Env
|
- name: Install Env
|
||||||
# this should be all we need because shiv will download the deps itself
|
# this should be all we need because shiv will download the deps itself
|
||||||
run: |
|
run: |
|
||||||
|
pip install --upgrade pip
|
||||||
pip install shiv
|
pip install shiv
|
||||||
pip install poetry
|
pip install poetry
|
||||||
# https://stackoverflow.com/a/64195658
|
- name: Add CURRENT_TIME env property
|
||||||
- name: Add SHORT_SHA env property with commit short sha
|
run: echo "CURRENT_TIME=$(date -Iseconds)" >> $GITHUB_ENV
|
||||||
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV
|
|
||||||
- name: Build the sucker
|
- name: Build the sucker
|
||||||
run: |
|
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
|
make build
|
||||||
- uses: ncipollo/release-action@v1
|
- uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
artifacts: "utils"
|
artifacts: "utils"
|
||||||
body: "It's releasin' time"
|
body: "It's releasin' time"
|
||||||
generateReleaseNotes: false
|
generateReleaseNotes: false
|
||||||
tag: ${{ env.SHORT_SHA }}
|
tag: v${{ env.CURRENT_TIME }}
|
||||||
commit: master
|
commit: master
|
||||||
token: ${{ secrets.PAT }}
|
token: ${{ secrets.PAT }}
|
||||||
|
Loading…
Reference in New Issue
Block a user