Skip to content
Open
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
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ on:
push:
branches: [main]

concurrency:
group: release
cancel-in-progress: false

permissions:
contents: write
id-token: write

jobs:
release:
Expand All @@ -16,6 +21,11 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
registry-url: https://registry.npmjs.org

- name: Get version from package.json
id: version
run: |
Expand All @@ -32,6 +42,21 @@ jobs:
echo "exists=false" >> "$GITHUB_OUTPUT"
fi

- name: Check if version is already on npm
id: check_npm
run: |
if npm view "@mimo-3/slack-cli@${{ steps.version.outputs.version }}" version >/dev/null 2>&1; then
echo "published=true" >> "$GITHUB_OUTPUT"
else
echo "published=false" >> "$GITHUB_OUTPUT"
fi

- name: Publish to npm
if: steps.check_npm.outputs.published == 'false'
run: |
npm ci
npm publish

- name: Create GitHub Release
if: steps.check_tag.outputs.exists == 'false'
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mimo-3/slack-cli",
"version": "0.22.1",
"version": "0.22.2",
"description": "A command-line tool for sending messages to Slack",
"main": "dist/index.js",
"bin": {
Expand Down