57 lines
2.2 KiB
YAML
57 lines
2.2 KiB
YAML
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
jobs:
|
|
build_and_publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: GitHub Tag Name example
|
|
run: |
|
|
echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME"
|
|
echo "Tag name from github.ref_name: ${{ github.ref_name }}"
|
|
- name: Install NodeJS
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- name: Install NPM Packages
|
|
run: |
|
|
npm i
|
|
cd ./client
|
|
npm i
|
|
cd ..
|
|
- name: Install VSCE
|
|
run: npm -g i @vscode/vsce
|
|
- name: Build Package Files
|
|
run: npm run package
|
|
- name: Update package.json Version
|
|
run: npm version ${{ github.ref_name }} --no-git-tag-version
|
|
- name: Commit and Push Changes
|
|
run: |
|
|
git config user.name "${{ vars.USERNAME_GIT }}"
|
|
git config user.email "${{ vars.EMAIL_GIT }}"
|
|
git add package.json
|
|
git commit -m "Update version to ${{ github.ref_name }}"
|
|
git push origin HEAD:main
|
|
- name: Publish to Visual Studio Marketplace (Pre-Release)
|
|
if: contains(github.ref_name, '-')
|
|
run: vsce publish --pre-release
|
|
env:
|
|
VSCE_PAT: ${{ secrets.VSCODE_MARKETPALCE }}
|
|
- name: Publish to Visual Studio Marketplace (Stable)
|
|
if: ${{ !contains(github.ref_name, '-') }}
|
|
run: vsce publish
|
|
env:
|
|
VSCE_PAT: ${{ secrets.VSCODE_MARKETPALCE }}
|
|
- name: Pack Extension for Release
|
|
run: vsce pack
|
|
- name: Upload VSIX to Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: "nx-post-support-*.vsix"
|
|
# generate_release_notes: true # Automatische Release Notes
|
|
# draft: false # N
|
|
# prerelease: false
|