-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added make-release workflow conditions
- Loading branch information
1 parent
1f67440
commit 35f73fa
Showing
2 changed files
with
23 additions
and
19 deletions.
There are no files selected for viewing
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,12 +1,8 @@ | ||
name: 'Build PyCyphal' | ||
name: 'Release PyCyphal' | ||
on: | ||
push: | ||
tags: [ '#release' ] | ||
workflow_run: | ||
workflows: [ 'Test PyCyphal' ] | ||
branches: [ master ] | ||
types: [ completed ] | ||
|
||
branch: [ master, issue-259 ] | ||
tag: [ '#release' ] | ||
|
||
# Ensures that only one workflow is running at a time | ||
concurrency: | ||
|
@@ -15,14 +11,21 @@ concurrency: | |
|
||
jobs: | ||
pycyphal-release: | ||
name: Release PyCyphal | ||
name: Create PyCyphal release | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
- name: Wait for test job to complete | ||
uses: lewagon/[email protected] | ||
with: | ||
ref: ${{ github.ref }} | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
wait-interval: 10 | ||
running-workflow-name: 'Create PyCyphal release' | ||
|
||
- name: Create distribution wheel | ||
run: | | ||
git submodule update --init --recursive | ||
python -m pip install --upgrade pip setuptools wheel twine | ||
|
@@ -35,14 +38,15 @@ jobs: | |
- name: Upload distribution | ||
run: | | ||
python -m twine upload dist/* | ||
echo 'python -m twine upload dist/*' | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN_PYCYPHAL }} | ||
|
||
- name: Push version tag | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
custom_tag: ${{ env.pycyphal_version }} | ||
tag_prefix: '' | ||
# - name: Push version tag | ||
# uses: mathieudutour/[email protected] | ||
# with: | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# custom_tag: ${{ env.pycyphal_version }} | ||
# tag_prefix: '' | ||
|
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