-
-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto-release using a date-based tag on master push
- Loading branch information
1 parent
32de0f7
commit 52850e7
Showing
4 changed files
with
35 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: "release" | ||
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
|
||
jobs: | ||
release: | ||
name: "Release" | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: "Generate tag" | ||
id: tag | ||
run: echo tag=$(./tools/auto_version.py) >> "$GITHUB_OUTPUT" | ||
|
||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "${{ steps.tag.outputs.tag }}" |
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
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env python3 | ||
from datetime import datetime | ||
|
||
# Outputs a version number to be tagged by github actions | ||
if __name__ == "__main__": | ||
now = datetime.utcnow() | ||
modifier = int( | ||
(now - now.replace(hour=0, minute=0, second=0, microsecond=0)).total_seconds() | ||
) | ||
print(now.strftime(f"%Y.%m.%d.{modifier}")) |