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

chore: update workflows #206

Merged
merged 4 commits into from
May 5, 2023
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/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ exclude-labels:
- 'S: invalid'
- 'S: merged'
- 'S: wontfix'
include-pre-releases: false
template: |
## What Changed

Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/do-prioritize-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow runs daily at noon.
#
# - Get list of labels.
# - Determine issue priority based on labels:
# - C: convention && P: bug --> U: high
# - C: style && P: bug --> U: medium
# - C: stakeholder && P:bug --> U: medium
# - C: convention && P: enhancement --> U: medium
# - C: style && P: enhancement --> U: low
# - C: stakeholder && P: enhancement --> U: low
# - chore || P: docs --> U: low
name: Prioritize Issues Workflow

on:
schedule:
cron: '00 12 * * *'

jobs:
prioritize_issues:
runs-on: ubuntu-latest
steps:
- name: Get Issue Labels
id: getlabels
uses: snnaplab/get-labels-action@v1

- name: Add High Urgency Labels
if: (endsWith(steps.getlabels.outputs.labels, ' convention ') && endsWith(steps.getlabels.outputs.labels, ' bug '))
uses: andymckay/labeler@master
with:
add-labels: "U: high"

- name: Add Medium Urgency Labels
if: (endsWith(steps.getlabels.outputs.labels, ' style ') && endsWith(steps.getlabels.outputs.labels, ' bug ')) || (endsWith(steps.getlabels.outputs.labels, ' stakeholder ') && endsWith(steps.getlabels.outputs.labels, ' bug ')) || (endsWith(steps.getlabels.outputs.labels, ' convenction ') && endsWith(steps.getlabels.outputs.labels, ' enhancement '))
uses: andymckay/labeler@master
with:
add-labels: "U: medium"

- name: Add Low Urgency Labels
if: (endsWith(steps.getlabels.outputs.labels, ' style ') && endsWith(steps.getlabels.outputs.labels, ' enhancement ')) || (endsWith(steps.getlabels.outputs.labels, ' stakeholder ') && endsWith(steps.getlabels.outputs.labels, ' enhancement ')) || endsWith(steps.getlabels.outputs.labels, ' doc ') || contains(steps.getlabels.outputs.labels, ' chore ')
uses: andymckay/labeler@master
with:
add-labels: "U: low"
13 changes: 7 additions & 6 deletions .github/workflows/do-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# - Upload the wheel to the new GitHub release.
# - Upload wheel to Test PyPi if build succeeds. (Future)
# - Test install from Test PyPi. (Future)
# - Upload wheel to PyPi if test install succeeds. (Future)
# - Upload wheel to PyPi if install test succeeds. (Future)
name: Do Release Workflow

on:
Expand Down Expand Up @@ -47,10 +47,10 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
sinceTag: "v1.3.1"
excludeTags: "latest"
excludeTagsRegex: "-rc[0-9]"
breakingLabel: "Breaking Changes"
breakingLabels: "V: major"
enhancementLabel: "New Features"
enhancementLabel: "Features"
enhancementLabels: "P: enhancement"
bugsLabel: "Bug Fixes"
bugLabels: "P: bug"
Expand Down Expand Up @@ -96,9 +96,9 @@ jobs:
if: ${{ env.build_ok == 1 }}
uses: release-drafter/release-drafter@v5
with:
name: "${{ steps.newversion.outputs.new_tag }}"
tag: "${{ steps.newversion.outputs.new_tag }}"
version: "${{ steps.newversion.outputs.new_tag }}"
name: "${{ steps.relversion.outputs.new_tag }}"
tag: "${{ steps.relversion.outputs.new_tag }}"
version: "${{ steps.relversion.outputs.new_tag }}"
prerelease: false
publish: true
env:
Expand All @@ -118,6 +118,7 @@ jobs:
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ steps.cutrelease.outputs.upload_url }}
asset_path: ./dist/*.whl

# - name: Publish to Test PyPi
# if: ${{ env.build_ok == 1 }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/on-issue-open.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This workflow runs when a new issue is opened.
#
# - Apply the 'fresh' label.
name: Issue Open Workflow

on:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on-push-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
id: newversion
run: |
tag=${GITHUB_REF/refs\/tags\//}
version=$(echo $new_tag | sed 's/.rc[0-9]*//')
version=$(echo $tag | sed 's/-rc[0-9]*//')
if [[ $tag != *"-rc"* ]]; then
echo "do_milestones=1" >> $GITHUB_ENV
echo "tag=$(echo $tag)" >> $GITHUB_OUTPUT
Expand All @@ -49,7 +49,7 @@ jobs:
if: ${{ env.do_milestones == 1 }}
uses: WyriHaximus/github-action-close-milestone@master
with:
number: ${{ steps.relversion.outputs.version }}
number: ${{ steps.newversion.outputs.version }}

- name: Create new minor release milestone
if: ${{ env.do_milestones == 1 }}
Expand Down