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

Update tag.yml #72

Merged
merged 1 commit into from
Dec 12, 2024
Merged
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
14 changes: 8 additions & 6 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets._GITHUB_TOKEN }}

- name: Git config
run: |
git config --global user.name "UltralyticsAssistant"
git config --global user.email "web@ultralytics.com"

- name: Check if tag exists
id: check_tag
run: |
Expand All @@ -49,27 +47,31 @@ jobs:
echo "Tag ${{ github.event.inputs.tag_name }} does not exist"
echo "tag_exists=false" >> $GITHUB_OUTPUT
fi

- name: Publish new tag
if: steps.check_tag.outputs.tag_exists == 'false'
run: |
git tag -a "${{ github.event.inputs.tag_name }}" -m "$(git log -1 --pretty=%B)"
git push origin "${{ github.event.inputs.tag_name }}"

- name: Set up Python environment
uses: actions/setup-python@v5
with:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-😍😍😍😍

python-version: "3.x"

- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install ultralytics-actions

- name: Publish new release
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN }}
CURRENT_TAG: ${{ github.event.inputs.tag_name }}
run: ultralytics-actions-summarize-release
shell: bash
- name: Notify Success
if: success() && github.event.inputs.publish_tag == 'true'
uses: slackapi/slack-github-action@v2.0.0
with:
webhook-type: incoming-webhook
webhook: ${{ secrets.SLACK_WEBHOOK_URL_HUBWEB }}
payload: |
text: "<!channel> GitHub Actions success for ${{ github.workflow }} βœ…\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* New tag and release `${{ github.event.inputs.tag_name }}` published πŸŽ‰\n*Job Status:* ${{ job.status }}\n*Release Notes:* https://github.com/${{ github.repository }}/releases/tag/${{ github.event.inputs.tag_name }}"
Loading