-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recombined workflows and release filter
- Loading branch information
1 parent
1877327
commit d4c6e5c
Showing
2 changed files
with
32 additions
and
51 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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: '' |