From 2adb2e7a4df85b7c94497e5b69e46ad05afab28e Mon Sep 17 00:00:00 2001 From: Tim Green Date: Fri, 17 May 2024 17:33:29 +0200 Subject: [PATCH] Use datetime as tag for release (#95) * use datetime as tag for release --- .github/workflows/release-samples.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-samples.yml b/.github/workflows/release-samples.yml index 73fdc35..dd28617 100644 --- a/.github/workflows/release-samples.yml +++ b/.github/workflows/release-samples.yml @@ -2,8 +2,6 @@ name: Upload Release Assets on: push: - tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 branches: - master @@ -24,6 +22,16 @@ jobs: run: | python -m pip install --upgrade pip + - name: Set current date as env variable + run: echo "DATETIME=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV + + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.2 + with: + custom_tag: v${{ env.DATETIME }} + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Build notebooks run: | python resources/package-samples.py notebooks --strip-output --outfile notebooks-stripped.zip --notebooks all @@ -35,8 +43,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.sha }} - release_name: Release ${{ github.sha }} + tag_name: v${{ env.DATETIME }} + release_name: Release v${{ env.DATETIME }} draft: false prerelease: false @@ -54,7 +62,7 @@ jobs: asset_path: ./notebooks-stripped.zip asset_name: notebooks-stripped.zip asset_content_type: application/zip - + - name: Upload Full Asset id: upload-full-asset uses: actions/upload-release-asset@v1