Skip to content

Commit

Permalink
fix: adjust workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
d0choa committed Dec 2, 2023
1 parent 005671a commit 38d5f1b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 41 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/docs.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: tests
on: [push]
jobs:
test:
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
42 changes: 37 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,44 @@
name: Semantic Release
name: Release and Documentation

on:
push:
branches:
- master
- main

jobs:
release:
Documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10.8
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install library
run: poetry install --without tests --no-interaction
- name: Publish docs
run: poetry run mkdocs gh-deploy --force

Release:
needs: Documentation
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):')
runs-on: ubuntu-latest
concurrency: release
permissions:
Expand All @@ -33,8 +65,8 @@ jobs:
- name: Python Semantic Release
run: |
git config --global user.name "github-actions"
git config --global user.email "action@github.com"
semantic-release publish -D commit_author="github-actions <action@github.com>"
git config --global user.email "github-actions@github.com"
semantic-release publish -D commit_author="github-actions <github-actions@github.com>"
env:
GH_TOKEN: ${{secrets.OTG_ETL_RELEASE}}
# PyPI_TOKEN: ${{secrets.PyPI_TOKEN}}

0 comments on commit 38d5f1b

Please sign in to comment.