Skip to content
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
5 changes: 4 additions & 1 deletion .github/actions/release-slack-bot/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: "Release Slack Bot"
description: "Release Slack Bot"
inputs:
release-tag:
required: true
description: "Release tag"
slack-token:
required: true
description: "Slack token"
Expand All @@ -13,7 +16,7 @@ runs:
method: chat.postMessage
token: ${{ inputs.slack-token }}
payload: |
username: ${{ job.status == 'success' && format('Released codegen@{0}', github.ref_name) || format('Failed to release codegen@{0}', github.ref_name) }}
username: ${{ job.status == 'success' && format('Released codegen@{0}', inputs.release-tag) || format('Failed to release codegen@{0}', inputs.release-tag) }}
channel: "#release"
icon_emoji: "${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}"
text: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Semantic version
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.semantic.outputs.git-tag }}
release-tag: ${{ steps.semantic.outputs.git-tag }}
permissions:
checks: read # to wait for required checks
contents: write # to be able to publish a GitHub release
Expand All @@ -36,10 +36,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
if: ${{ needs.semantic-version.outputs.tag }}
if: ${{ needs.semantic-version.outputs.release-tag }}
needs: semantic-version
uses: ./.github/workflows/release.yml
permissions:
contents: write
with:
tag: ${{ needs.semantic-version.outputs.tag }}
release-tag: ${{ needs.semantic-version.outputs.release-tag }}
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build & Release
on:
workflow_call:
inputs:
tag:
release-tag:
required: true
type: string
description: Tag to release
Expand All @@ -13,7 +13,7 @@ on:
# tag:
# required: true
# type: string
# description: Tag to release # TODO: create if it does not exist
# description: Tag to release
push:
tags:
- v*
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.tag || github.event.pull_request.head.ref || github.ref }}
ref: ${{ inputs.release-tag || github.event.pull_request.head.ref || github.ref }}

- name: Install UV
uses: astral-sh/setup-uv@v5.2
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
path: ./wheelhouse/*.whl

release:
if: ${{ inputs.tag || startsWith(github.ref, 'refs/tags/') }}
if: ${{ inputs.release-tag || startsWith(github.ref, 'refs/tags/') }}
needs: build
runs-on: ubuntu-latest
environment: release
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
id: github-release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag || github.ref_name }}
tag_name: ${{ inputs.release-tag || github.ref_name }}
files: dist/*
fail_on_unmatched_files: true
generate_release_notes: ${{ startsWith(github.ref, 'refs/tags/') }}
Expand All @@ -117,5 +117,5 @@ jobs:
if: always()
uses: ./.github/actions/release-slack-bot
with:
release-tag: ${{ github.ref_name }}
release-tag: ${{ inputs.release-tag || github.ref_name }}
slack-token: ${{ secrets.SLACK_BOT_TOKEN }}