Release #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
jobs: | |
create-tag: | |
runs-on: ubuntu-latest | |
outputs: | |
tagname: ${{ steps.get_tag.outputs.tagname }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Get tag from package.json | |
id: get_tag | |
run: | | |
VERSION=$(cat package.json | jq -r '.version') | |
echo "tagname=v${VERSION}" >> $GITHUB_OUTPUT | |
- uses: rickstaa/action-create-tag@v1 | |
with: | |
tag: ${{ steps.get_tag.outputs.tagname }} | |
build-extension: | |
needs: create-tag | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install requirements | |
run: npm i | |
- name: Install vsce | |
run: npm install -g @vscode/vsce | |
- name: Build the extension | |
run: vsce package -o namingbuddy-${{ needs.create-tag.outputs.tagname }}.vsix | |
- name: Upload the extension | |
uses: actions/upload-artifact@v4 | |
with: | |
name: namingbuddy-${{ needs.create-tag.outputs.tagname }}.vsix | |
path: namingbuddy-${{ needs.create-tag.outputs.tagname }}.vsix | |
release: | |
runs-on: ubuntu-latest | |
needs: [create-tag, build-extension] | |
steps: | |
- name: Download Extension | |
uses: actions/download-artifact@v4 | |
with: | |
name: namingbuddy-${{ needs.create-tag.outputs.tagname }}.vsix | |
path: namingbuddy-${{ needs.create-tag.outputs.tagname }}.vsix | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ needs.create-tag.outputs.tagname }} | |
name: ${{ needs.create-tag.outputs.tagname }} | |
files: namingbuddy-${{ needs.create-tag.outputs.tagname }}.vsix |