Skip to content

Commit

Permalink
ci: skip announce when package is already published (#8438)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Aug 9, 2024
1 parent 2b37ebe commit 62614bf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jobs:
publish:
name: Publish
runs-on: ubuntu-latest
allow-failure: true
env:
NX_SKIP_NX_CACHE: true
steps:
Expand All @@ -29,24 +30,23 @@ jobs:
id: info
run: echo "version=v$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT

# TODO: uncomment later
# - name: Announce to Time messenger
# uses: taiga-family/ci/actions/messenger/time/[email protected]
# if: ${{ !contains(steps.info.outputs.version, 'rc') }}
# with:
# url: ${{ secrets.ANNOUNCE_WEBHOOK }}
# channel: ${{ secrets.ANNOUNCE_TARGET }}
# version: ${{ steps.info.outputs.version }}
- name: Announce to Time messenger
uses: taiga-family/ci/actions/messenger/time/[email protected]
if: ${{ !contains(steps.info.outputs.version, 'rc') }}
with:
url: ${{ secrets.ANNOUNCE_WEBHOOK }}
channel: ${{ secrets.ANNOUNCE_TARGET }}
version: ${{ steps.info.outputs.version }}

# - name: Announce to Telegram messenger
# uses: taiga-family/ci/actions/messenger/telegram/[email protected]
# if: ${{ !contains(steps.info.outputs.version, 'rc') }}
# with:
# chatId: ${{ secrets.TAIGA_TELEGRAM_CHAT_ID }}
# topicId: ${{ secrets.TAIGA_TELEGRAM_CHAT_THREAD_ID }}
# token: ${{ secrets.TAIGA_TELEGRAM_BOT_TOKEN }}
# version: ${{ steps.info.outputs.version }}
# textLink: '@taiga-ui/cdk'
- name: Announce to Telegram messenger
uses: taiga-family/ci/actions/messenger/telegram/[email protected]
if: ${{ !contains(steps.info.outputs.version, 'rc') }}
with:
chatId: ${{ secrets.TAIGA_TELEGRAM_CHAT_ID }}
topicId: ${{ secrets.TAIGA_TELEGRAM_CHAT_THREAD_ID }}
token: ${{ secrets.TAIGA_TELEGRAM_BOT_TOKEN }}
version: ${{ steps.info.outputs.version }}
textLink: '@taiga-ui/cdk'

concurrency:
group: release-${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const path = getValueByFlag<string>('--path', '');
if (versions.includes(version) && !isDryRun) {
errorLog(`${packageJson.name}@${version} is already published`);

return;
process.exit(1);
}

infoLog(`name: ${packageJson.name}`);
Expand Down

0 comments on commit 62614bf

Please sign in to comment.