Skip to content

Commit

Permalink
Create release on tag as well as publishing.
Browse files Browse the repository at this point in the history
  • Loading branch information
qwandor committed Mar 8, 2024
1 parent 6d9ca5a commit c6873d6
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Expand Up @@ -14,7 +14,33 @@ jobs:
with:
node-version: 20
- run: npm ci
- name: Parse tag for package and version
id: parse_tag
uses: actions-ecosystem/action-regex-match@v2
with:
text: ${{ github.ref }}
regex: "^refs/tags/(.+)$"
- name: Publish to Open VSX Registry
id: publish_to_open_vsx
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
- name: Upload packages
uses: actions/upload-artifact@v4
with:
name: vsix
path: ${{ steps.publish_to_open_vsx.outputs.vsixPath }}
- name: Create draft release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions.
with:
tag_name: ${{ github.ref }}
release_name: ${{ steps.parse_tag.outputs.group1 }}
- name: Upload packages to release
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.publish_to_open_vsx.outputs.vsixPath }}
asset_content_type: application/vsix

0 comments on commit c6873d6

Please sign in to comment.