Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create automatic releases via github workflow. #55

Merged
merged 1 commit into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/scripts/set_release_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Obtains a date-based version for the release workflow.

import datetime

now_utc = datetime.datetime.now(datetime.timezone.utc)
version = now_utc.strftime('%Y.%m%d.%H%M%S')
print('::set-output name=version::v{}'.format(version))
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Release
on:
push:
branches:
- 'master'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@master
with:
python-version: '3.x'
- name: Set Release Version
id: set_release_version
run: python ./.github/scripts/set_release_version.py
- name: Create Archive Release
uses: thedoctor0/zip-release@master
with:
filename: 'emboss.zip'
exclusions: '*.git*'
- name: Automatic Release Upload
id: automatic_release
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
automatic_release_tag: ${{ steps.set_release_version.outputs.version }}
prerelease: false
title: ${{ steps.set_release_version.outputs.version }}
files: |
emboss.zip