Skip to content

Commit 70db94a

Browse files
authored
chore(ci): standardize workflows (build, publish, preview-changelog, contributors) (#35)
- Rename ci.yml to build.yml - Remove check-dist.yml (dist rebuilt during publish only) - Add preview-changelog.yml for release notes preview - Add publish.yml with dist rebuild, GitHub release, social notifications - Add contributors.yml for automated contributor updates - Refresh README with badges, emojis, and contributors section
1 parent 3952d8e commit 70db94a

File tree

6 files changed

+182
-94
lines changed

6 files changed

+182
-94
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Continuous Integration
1+
name: Build
22

33
on:
44
workflow_dispatch:

.github/workflows/check-dist.yml

Lines changed: 0 additions & 72 deletions
This file was deleted.

.github/workflows/contributors.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Update Contributors
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
contributors:
10+
uses: CodingWithCalvin/.github/.github/workflows/contributors.yml@main
11+
secrets: inherit
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Preview Changelog
2+
3+
run-name: Preview release notes for next release
4+
5+
on:
6+
workflow_dispatch:
7+
8+
jobs:
9+
generate:
10+
name: Generate
11+
uses: CodingWithCalvin/.github/.github/workflows/generate-changelog.yml@main
12+
secrets: inherit
13+
14+
preview:
15+
name: Display Preview
16+
runs-on: ubuntu-latest
17+
needs: generate
18+
19+
steps:
20+
- name: Display changelog preview
21+
run: |
22+
echo "=========================================="
23+
echo "CHANGELOG PREVIEW"
24+
echo "=========================================="
25+
echo ""
26+
echo "${{ needs.generate.outputs.changelog }}"
27+
shell: bash

.github/workflows/publish.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Publish
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version to release (e.g., 1.2.0)'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
changelog:
13+
uses: CodingWithCalvin/.github/.github/workflows/generate-changelog.yml@main
14+
secrets: inherit
15+
16+
release:
17+
needs: changelog
18+
runs-on: ubuntu-latest
19+
outputs:
20+
version: ${{ inputs.version }}
21+
22+
permissions:
23+
contents: write
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Setup Node.js
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version-file: .node-version
33+
cache: npm
34+
35+
- name: Install Dependencies
36+
run: npm ci
37+
38+
- name: Rebuild dist
39+
run: npm run bundle
40+
41+
- name: Commit dist changes
42+
run: |
43+
git config user.name "github-actions[bot]"
44+
git config user.email "github-actions[bot]@users.noreply.github.com"
45+
git add dist/
46+
git diff --staged --quiet || git commit -m "chore: rebuild dist for v${{ inputs.version }}"
47+
git push
48+
49+
- name: Create and push tag
50+
run: |
51+
git tag v${{ inputs.version }}
52+
git push origin v${{ inputs.version }}
53+
54+
- name: Create GitHub Release
55+
uses: softprops/action-gh-release@v1
56+
with:
57+
tag_name: v${{ inputs.version }}
58+
name: v${{ inputs.version }}
59+
body: ${{ needs.changelog.outputs.changelog }}
60+
61+
notify-bluesky:
62+
needs: release
63+
uses: CodingWithCalvin/.github/.github/workflows/bluesky-post.yml@main
64+
with:
65+
post_text: |
66+
🚀 JetBrains Marketplace Publisher v${{ needs.release.outputs.version }} has been released!
67+
68+
Publish your JetBrains plugins to the marketplace with ease!
69+
70+
[📋 Release Notes](https://github.com/${{ github.repository }}/releases/tag/v${{ needs.release.outputs.version }})
71+
[📦 GitHub Marketplace](https://github.com/marketplace/actions/jetbrains-marketplace-publisher)
72+
73+
#github #githubactions #devops #automation
74+
embed_url: https://github.com/marketplace/actions/jetbrains-marketplace-publisher
75+
embed_title: JetBrains Marketplace Publisher
76+
embed_description: Publish your JetBrains plugins to the marketplace with ease!
77+
secrets:
78+
BLUESKY_USERNAME: ${{ secrets.BLUESKY_USERNAME }}
79+
BLUESKY_APP_PASSWORD: ${{ secrets.BLUESKY_APP_PASSWORD }}
80+
81+
notify-linkedin:
82+
needs: release
83+
uses: CodingWithCalvin/.github/.github/workflows/linkedin-post.yml@main
84+
with:
85+
post_text: |
86+
🚀 JetBrains Marketplace Publisher v${{ needs.release.outputs.version }} has been released!
87+
88+
Publish your JetBrains plugins to the marketplace with ease!
89+
90+
📋 Release Notes: https://github.com/${{ github.repository }}/releases/tag/v${{ needs.release.outputs.version }}
91+
📦 GitHub Marketplace: https://github.com/marketplace/actions/jetbrains-marketplace-publisher
92+
93+
#github #githubactions #devops #automation
94+
article_url: https://github.com/marketplace/actions/jetbrains-marketplace-publisher
95+
article_title: JetBrains Marketplace Publisher
96+
article_description: Publish your JetBrains plugins to the marketplace with ease!
97+
secrets:
98+
LINKEDIN_ACCESS_TOKEN: ${{ secrets.LINKEDIN_ACCESS_TOKEN }}
99+
LINKEDIN_CLIENT_ID: ${{ secrets.LINKEDIN_CLIENT_ID }}

README.md

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,63 @@
1-
# CodingWithCalvin/GHA-JBMarketplacePublisher
1+
# JetBrains Marketplace Publisher
22

3-
Github Action to publish your JetBrains plugin to the marketplace
3+
[![Build](https://img.shields.io/github/actions/workflow/status/CodingWithCalvin/GHA-JBMarketplacePublisher/build.yml?style=for-the-badge&label=Build)](https://github.com/CodingWithCalvin/GHA-JBMarketplacePublisher/actions/workflows/build.yml)
4+
[![GitHub release](https://img.shields.io/github/v/release/CodingWithCalvin/GHA-JBMarketplacePublisher?style=for-the-badge)](https://github.com/CodingWithCalvin/GHA-JBMarketplacePublisher/releases)
5+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](LICENSE)
46

5-
## Usage
7+
🚀 Publish your JetBrains plugins to the marketplace with ease!
68

7-
You can use the JB Marketplace Publish GitHub Action by configuring a YAML-based
8-
workflow file, e.g. .github/workflows/deploy.yml.
9+
This GitHub Action publishes your JetBrains plugin (ZIP archive) to the JetBrains Marketplace.
910

10-
```yml
11+
## 🚀 Usage
12+
13+
You can use the JetBrains Marketplace Publisher GitHub Action by configuring a YAML-based workflow file, e.g. `.github/workflows/deploy.yml`.
14+
15+
## 📥 Inputs
16+
17+
| Input | Required | Description |
18+
|-------|----------|-------------|
19+
| `marketplace-pat` | Yes | Your Personal Access Token for the JetBrains Marketplace |
20+
| `archive-path` | Yes | Path to the local ZIP package to publish |
21+
| `plugin-id` | No* | Plugin ID from the JetBrains Marketplace URL |
22+
| `plugin-xml-id` | No* | Unique identifier from the `<id>` tag in plugin.xml |
23+
| `channel` | No | Channel to publish to (default: `stable`) |
24+
| `is-hidden` | No | Make the update hidden after approval (default: `false`) |
25+
26+
> ⚠️ **Note:** One of `plugin-id` or `plugin-xml-id` is required, but not both.
27+
28+
## 📋 Example
29+
30+
```yaml
1131
steps:
1232
- name: Checkout
13-
uses: actions/checkout@v2
33+
uses: actions/checkout@v4
1434

1535
- name: JetBrains Marketplace Publisher
16-
uses: CodingWithCalvin/GHA-JBMarketplacePublisher@v1.0.0
36+
uses: CodingWithCalvin/GHA-JBMarketplacePublisher@v1
1737
with:
1838
# REQUIRED
19-
marketplace-pat: ${{ secrets.marketplace_pat }}
20-
archive-path: ./src/outputFolder/extension.zip
39+
marketplace-pat: ${{ secrets.JB_MARKETPLACE_PAT }}
40+
archive-path: './src/outputFolder/plugin.zip'
2141

22-
# ONE OF THE FOLLOWING IS REQUIRED, BUT NOT BOTH
42+
# ONE OF THE FOLLOWING IS REQUIRED
2343
plugin-id: 1000
24-
plugin-xml-id: '1001'
44+
# OR
45+
plugin-xml-id: 'com.example.myplugin'
2546

2647
# OPTIONAL
2748
channel: stable
2849
is-hidden: false
2950
```
3051
31-
## Inputs
52+
## 👥 Contributors
53+
54+
<!-- readme: contributors -start -->
55+
<!-- readme: contributors -end -->
56+
57+
## 📄 License
58+
59+
MIT License - see [LICENSE](LICENSE) for details.
60+
61+
---
3262
33-
| Input | Required | Description |
34-
| --------------- | -------- | ---------------------------------------------------------------------------- |
35-
| marketplace-pat | Y | Your 'Personal Access Token' to perform actions on the JetBrains Marketplace |
36-
| archive-path | Y | Path to the local ZIP package you wish to publish |
37-
| plugin-id | N | Your Plugin ID from the JetBrains Marketplace |
38-
| plugin-xml-id | N | The unique identifier from the &lt;id&gt; tag of plugin.xml |
39-
| channel | N | Channel to publish to (if omitted, defaults to "stable") |
40-
| is-hidden | N | Make the update hidden (if omitted, defaults to false) |
63+
Made with ❤️ by Coding With Calvin

0 commit comments

Comments
 (0)