Skip to content

Commit

Permalink
Adds "schedule" and "release" trigger to CI workflow (#7)
Browse files Browse the repository at this point in the history
* Changes the target from "test-release" to "release"
  • Loading branch information
Hirotaka Wakabayashi authored Dec 2, 2020
1 parent 6775cc1 commit d9ba53e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * 1'
# Trigger the workflow on release,
# but only when published
release:
types:
- published

jobs:
build:
Expand Down Expand Up @@ -45,3 +52,10 @@ jobs:
- name: Install the package locally
run: |
make install
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
if: github.event_name == 'release'
run: |
make release
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ test: version ## builds source and wheel package
@echo 'rpmspec ' ${RPMSPEC_VERSION}
@if test "${SOURCE_VERSION}" = "${HISTORY_VERSION}" -a "${HISTORY_VERSION}" = "${RPMSPEC_VERSION}" ; then \
pipenv run python3 -m unittest ; \
else \
exit 1; \
fi

test-all: lint test
Expand Down
2 changes: 1 addition & 1 deletion python-k2hr3-osnl.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%global srcname k2hr3_osnl
%global pypi_name k2hr3-osnl
Name: python-k2hr3-osnl
Version: 0.9.4
Version: 0.9.5
Release: 1%{?dist}
Summary: An OpenStack notification listener for K2HR3

Expand Down

0 comments on commit d9ba53e

Please sign in to comment.