-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use datetime as tag for release (#95)
* use datetime as tag for release
- Loading branch information
Showing
1 changed file
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[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 | ||
|
@@ -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 | ||
|