Skip to content

Commit b9acac9

Browse files
authored
chore(ci): update GitHub Actions workflows (#15)
1 parent 2620a7a commit b9acac9

File tree

2 files changed

+37
-21
lines changed

2 files changed

+37
-21
lines changed

.github/workflows/publish.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,41 @@ name: Publish to VS Marketplace
33
on:
44
workflow_dispatch:
55

6+
permissions:
7+
contents: write
8+
actions: read
9+
610
jobs:
711
publish:
812
runs-on: windows-latest
13+
outputs:
14+
version: ${{ steps.artifact_manifest.outputs.version }}
915
steps:
1016
- name: Checkout
1117
uses: actions/checkout@v4
12-
18+
1319
- name: 1. Download artifact
1420
id: download-artifact
15-
uses: dawidd6/action-download-artifact@v2
21+
uses: dawidd6/action-download-artifact@v6
1622
with:
17-
github_token: ${{ secrets.GH_SECRET }}
1823
workflow: release_build_and_deploy.yml
1924
workflow_conclusion: success
20-
25+
2126
- name: 2. Parse Artifact Manifest
2227
id: artifact_manifest
2328
uses: ActionsTools/read-json-action@main
2429
with:
2530
file_path: ./artifact/CodingWithCalvin.ProjectRenamifier.info
26-
31+
2732
- name: 3. Create Tag & Release
2833
uses: ncipollo/[email protected]
2934
with:
3035
artifacts: ./artifact/CodingWithCalvin.ProjectRenamifier.vsix
3136
generateReleaseNotes: true
3237
makeLatest: true
33-
token: ${{ secrets.GH_SECRET }}
3438
commit: ${{ steps.artifact_manifest.outputs.sha }}
3539
tag: ${{ steps.artifact_manifest.outputs.version }}
36-
40+
3741
- name: 4. Publish Release to Marketplace
3842
if: success()
3943
uses: CodingWithCalvin/GHA-VSMarketplacePublisher@v1
@@ -42,4 +46,16 @@ jobs:
4246
publish-manifest-path: ./resources/extension.manifest.json
4347
vsix-path: ./artifact/CodingWithCalvin.ProjectRenamifier.vsix
4448

49+
notify:
50+
needs: publish
51+
uses: CodingWithCalvin/.github/.github/workflows/bluesky-post.yml@main
52+
with:
53+
post_text: |
54+
🚀 Project Renamifier v${{ needs.publish.outputs.version }} for #VisualStudio has been released!
55+
56+
[Check out the release notes here!](https://github.com/${{ github.repository }}/releases/tag/${{ needs.publish.outputs.version }})
4557
58+
Marketplace: https://marketplace.visualstudio.com/items?itemName=CodingWithCalvin.VS-ProjectRenamifier
59+
secrets:
60+
BLUESKY_USERNAME: ${{ secrets.BLUESKY_USERNAME }}
61+
BLUESKY_APP_PASSWORD: ${{ secrets.BLUESKY_APP_PASSWORD }}

.github/workflows/release_build_and_deploy.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
name: 'Build and Deploy'
2-
2+
33
on:
44
workflow_dispatch:
5-
# pull_request:
6-
# types: [opened, reopened]
7-
# push:
8-
# branches:
9-
# - main
10-
# tags-ignore:
11-
# - '[0-9]+.[0-9]+.[0-9]+.[0-9]+'
12-
5+
pull_request:
6+
types: [opened, reopened]
7+
push:
8+
branches:
9+
- main
10+
tags-ignore:
11+
- '[0-9]+.[0-9]+.[0-9]+.[0-9]+'
12+
1313
jobs:
14-
Release-Build-and-Deploy:
14+
Release-Build-and-Deploy:
1515
runs-on: windows-latest
16-
16+
1717
steps:
1818
- uses: actions/checkout@v4
1919
- uses: microsoft/setup-msbuild@v2
@@ -27,8 +27,8 @@ jobs:
2727
extension-source-file: 'src/CodingWithCalvin.ProjectRenamifier/source.extension.cs'
2828

2929
- name: 2. Restoring Packages
30-
run: nuget restore src/CodingWithCalvin.ProjectRenamifier.sln
31-
30+
run: nuget restore src/CodingWithCalvin.ProjectRenamifier/CodingWithCalvin.ProjectRenamifier.slnx
31+
3232
- name: 3. Building Project
3333
run: msbuild 'src/CodingWithCalvin.ProjectRenamifier/CodingWithCalvin.ProjectRenamifier.csproj' /p:configuration='Release' /p:platform='x64' /p:DeployExtension=False
3434

@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
name: 'src/CodingWithCalvin.ProjectRenamifier/bin/x64/Release/CodingWithCalvin.ProjectRenamifier.info'
3939
json: '{"sha":"${{ github.sha }}", "version":"${{ steps.step-version.outputs.version }}"}'
40-
40+
4141
- name: 5. Publishing Build Artifact
4242
uses: actions/upload-artifact@v4
4343
with:

0 commit comments

Comments
 (0)