Skip to content

Commit

Permalink
Recombined workflows and release filter
Browse files Browse the repository at this point in the history
  • Loading branch information
clyde-johnston committed Aug 10, 2023
1 parent 1877327 commit d4c6e5c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 51 deletions.
50 changes: 0 additions & 50 deletions .github/workflows/make-release.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Test Yakut Workflow'
name: 'Test and Release Yakut'
on: [ push, pull_request ]

# Ensures that only one workflow is running at a time - required for duplicate pushes and repushing a PR
Expand Down Expand Up @@ -54,3 +54,34 @@ jobs:
nox --non-interactive --session test --python ${{ matrix.python }}
nox --non-interactive --session lint
yakut-release:
name: Release Yakut
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '#release') || contains(github.ref, '/main')
needs: yakut-test
steps:
- name: Check out
uses: actions/checkout@v3

- name: Create distribution wheel
run: |
git submodule update --init --recursive
python -m pip install --upgrade pip setuptools wheel twine
python setup.py sdist bdist_wheel
- name: Get release version
run: echo "yakut_version=$(cat yakut/VERSION)" >> $GITHUB_ENV

- name: Upload distribution
run: |
python -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN_YAKUT }}

- name: Push version tag
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ env.yakut_version }}
tag_prefix: ''

0 comments on commit d4c6e5c

Please sign in to comment.