Skip to content

Commit 9c1c00e

Browse files
authored
chore(ci): standardize workflows (#83)
* chore(ci): standardize workflows (build, publish, preview-changelog, contributors) - Rename ci.yml to build.yml, add workflow_dispatch trigger - 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 * chore: update package-lock.json
1 parent f2e3c2a commit 9c1c00e

File tree

7 files changed

+188
-94
lines changed

7 files changed

+188
-94
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
name: Continuous Integration
1+
name: Build
22

33
on:
4+
workflow_dispatch:
45
pull_request:
56
branches:
67
- main

.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+
🚀 Visual Studio Marketplace Publisher v${{ needs.release.outputs.version }} has been released!
67+
68+
Publish your Visual Studio extensions 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/visual-studio-marketplace-publisher)
72+
73+
#github #githubactions #devops #automation
74+
embed_url: https://github.com/marketplace/actions/visual-studio-marketplace-publisher
75+
embed_title: Visual Studio Marketplace Publisher
76+
embed_description: Publish your Visual Studio extensions 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+
🚀 Visual Studio Marketplace Publisher v${{ needs.release.outputs.version }} has been released!
87+
88+
Publish your Visual Studio extensions 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/visual-studio-marketplace-publisher
92+
93+
#github #githubactions #devops #automation
94+
article_url: https://github.com/marketplace/actions/visual-studio-marketplace-publisher
95+
article_title: Visual Studio Marketplace Publisher
96+
article_description: Publish your Visual Studio extensions 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: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,60 @@
1-
# CodingWithCalvin/GHA-VSMarketplacePublisher
1+
# Visual Studio Marketplace Publisher
22

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

5-
## Usage
7+
📦 Publish your Visual Studio extensions to the marketplace with ease!
68

7-
You can use the VS Marketplace Publish GitHub Action by configuring a YAML-based
8-
workflow file, e.g. .github/workflows/deploy.yml.
9+
This GitHub Action publishes your Visual Studio extension (.vsix) to the Visual Studio Marketplace.
910

10-
> _This action only works on a Windows-based runner_
11+
## 🚀 Usage
1112

12-
## Publish a local VSIX File
13+
You can use the Visual Studio Marketplace Publisher GitHub Action by configuring a YAML-based workflow file, e.g. `.github/workflows/deploy.yml`.
1314

14-
```yml
15+
> ⚠️ **Note:** This action only works on a Windows-based runner.
16+
17+
## 📥 Inputs
18+
19+
| Input | Required | Description |
20+
|-------|----------|-------------|
21+
| `marketplace-pat` | Yes | Your Personal Access Token for the Visual Studio Marketplace |
22+
| `publish-manifest-path` | Yes | Path to your publish manifest (JSON file) |
23+
| `vsix-path` | Yes | Path to the local VSIX package to publish |
24+
| `vs-version` | No | Version of Visual Studio tooling to use (default: `latest`) |
25+
| `vs-prerelease` | No | Allow pre-release Visual Studio tooling (default: `false`) |
26+
27+
## 📋 Example
28+
29+
Publish a local VSIX file:
30+
31+
```yaml
1532
steps:
1633
- name: Checkout
17-
uses: actions/checkout@v2
34+
uses: actions/checkout@v4
1835

1936
- name: Visual Studio Marketplace Publisher
20-
uses: CodingWithCalvin/GHA-VSMarketplacePublisher@v2.0.0
37+
uses: CodingWithCalvin/GHA-VSMarketplacePublisher@v2
2138
with:
2239
# REQUIRED
23-
marketplace-pat: ${{ secrets.vs_pat }}
24-
publish-manifest-path: ./src/vsixManifest.json
25-
vsix-path: ./src/outputFolder/Extension.vsix
40+
marketplace-pat: ${{ secrets.VS_MARKETPLACE_PAT }}
41+
publish-manifest-path: './src/vsixManifest.json'
42+
vsix-path: './src/outputFolder/Extension.vsix'
2643

2744
# OPTIONAL
2845
vs-version: latest
2946
vs-prerelease: false
3047
```
3148
32-
## Inputs
49+
## 👥 Contributors
50+
51+
<!-- readme: contributors -start -->
52+
<!-- readme: contributors -end -->
53+
54+
## 📄 License
55+
56+
MIT License - see [LICENSE](LICENSE) for details.
57+
58+
---
3359
34-
| Input | Required | Description |
35-
| --------------------- | -------- | -------------------------------------------------------------------------------- |
36-
| marketplace-pat | Y | Your 'Personal Access Token' to perform actions on the Visual Studio Marketplace |
37-
| publish-manifest-path | Y | Path to the manifest used for the publish |
38-
| vsix-path | Y | Path to the local VSIX package you wish to publish |
39-
| vs-version | N | Specify the exact version of Visual Studio tooling to use; default to `latest` |
40-
| vs-prerelease | N | Allow a pre-release installation of Visual Studio tooling; default to `false` |
60+
Made with ❤️ by Coding With Calvin

package-lock.json

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)