Skip to content

Commit

Permalink
Use datetime as tag for release (#95)
Browse files Browse the repository at this point in the history
* use datetime as tag for release
  • Loading branch information
tiimgreen authored May 17, 2024
1 parent b459da6 commit 2adb2e7
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/release-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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/[email protected]
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
Expand 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

Expand All @@ -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
Expand Down

0 comments on commit 2adb2e7

Please sign in to comment.