6262 debug-raspberry-pi-pico-*.vsix
6363 raspberry-pi-pico-*.vsix
6464 ovsx-raspberry-pi-pico-*.vsix
65+
66+ # Test PATs
6567 - name : Test PAT
6668 if : ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
6769 env :
@@ -72,21 +74,38 @@ jobs:
7274 if : ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
7375 run : |
7476 npx ovsx verify-pat -p ${{ secrets.OPEN_VSX_PAT }}
77+
78+ # Pre-release
79+ - name : Add Pre-release Notes
80+ uses : softprops/action-gh-release@v2
81+ if : startsWith(github.ref, 'refs/tags/') && contains(github.event.head_commit.message, 'Pre-release')
82+ with :
83+ prerelease : true
84+ generate_release_notes : true
85+ body : " > **Note: This is a pre-release, so may not be stable**"
86+ files : |
87+ debug-raspberry-pi-pico-*.vsix
88+ raspberry-pi-pico-*.vsix
89+ ovsx-raspberry-pi-pico-*.vsix
90+
91+ # Release
7592 - name : Add Release Asset
7693 uses : softprops/action-gh-release@v2
77- if : startsWith(github.ref, 'refs/tags/')
94+ if : startsWith(github.ref, 'refs/tags/') && !contains(github.event.head_commit.message, 'Pre-release')
7895 with :
7996 files : |
8097 debug-raspberry-pi-pico-*.vsix
8198 raspberry-pi-pico-*.vsix
8299 ovsx-raspberry-pi-pico-*.vsix
100+
101+ # Publishing
83102 - name : Publish Extension
84103 if : startsWith(github.ref, 'refs/tags/')
85104 env :
86105 VSCE_PAT : ${{ secrets.VSCODE_MARKETPLACE_PAT }}
87106 run : |
88- vsce publish -i raspberry-pi-pico-*.vsix
107+ vsce publish -i ${{ contains(github.event.head_commit.message, 'Pre-release') && 'debug- raspberry-pi-pico-*.vsix --pre-release' || 'raspberry-pi-pico-*.vsix' }}
89108 - name : Publish Extension to OVSX
90109 if : startsWith(github.ref, 'refs/tags/')
91110 run : |
92- npx ovsx publish ovsx-raspberry-pi-pico-*.vsix -p ${{ secrets.OPEN_VSX_PAT }}
111+ npx ovsx publish ovsx-raspberry-pi-pico-*.vsix -p ${{ secrets.OPEN_VSX_PAT }} ${{ contains(github.event.head_commit.message, 'Pre-release') && '--pre-release' || '' }}
0 commit comments