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

Fix: Release workflow #211

Merged
merged 1 commit into from
Oct 9, 2020
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
1 change: 1 addition & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- develop
- master

jobs:
tests:
Expand Down
54 changes: 11 additions & 43 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,14 @@
name: darts release workflow

on:
push:
branches:
- master
workflow_dispatch:
inputs:
bump_type:
description: "Bump type (#major, #minor, #patch)"
required: true

jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
python-version: [3.6, 3.7, 3.8]

steps:
- name: "1. Clone repository"
uses: actions/checkout@v2

- name: "2. Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: "3. Setup pip"
run: |
./gradlew setupPip

- name: "4. Attach cache for pip"
uses: actions/cache@v1
id: cache
with:
path: ~/.cache/pip
key: tests-${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('requirements/core.txt', 'requirements/dev.txt', 'requirements/fbprophet.txt', 'requirements/pmdarima.txt', 'requirements/torch.txt') }}
restore-keys: |
tests-${{ runner.os }}-pip-

- name: "5. Tests"
run: |
./gradlew test_all

release:
needs: [tests]
runs-on: ubuntu-latest
steps:
- name: "1. Clone repository"
Expand Down Expand Up @@ -71,12 +39,12 @@ jobs:
pip install -q -r requirements/release.txt

- name: "6. Determine next version"
uses: endrjuskr/github-tag-action@master
uses: LeoTafti/github-tag-action@master
id: bump_dry
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INITIAL_VERSION: 0.0.2
DRY_RUN: true
BUMP_TYPE: ${{ github.event.inputs.bump_type}}

- name: "7. Bump version"
run: |
Expand All @@ -91,20 +59,20 @@ jobs:
commit_user_email: [email protected]

- name: "9. Publish new tag"
uses: endrjuskr/github-tag-action@master
uses: LeoTafti/github-tag-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CUSTOM_TAG: ${{steps.bump_dry.outputs.new_tag}}

- name: "10. Create new release draft"
- name: "10. Create new release"
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.bump_dry.outputs.new_tag }}
release_name: Release ${{steps.bump_dry.outputs.part}} ${{ steps.bump_dry.outputs.new_tag }}
draft: true
draft: false

deploy-docker:
needs: [release]
Expand All @@ -114,7 +82,7 @@ jobs:
uses: actions/checkout@v2

- name: "2. Determine current version"
uses: endrjuskr/github-tag-action@master
uses: LeoTafti/github-tag-action@master
id: bump_dry
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down