Files
nx_post_support/.gitea/workflows/build_and_puplish.yml
T
Christoph 896f27145c
/ build_and_publish (push) Failing after 15s
Update .gitea/workflows/build_and_puplish.yml
2025-01-08 08:45:31 +00:00

44 lines
1.4 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
- name: Install VSCE
run: npm -g i @vscode/vsce
- name: Extract tag name
run: echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Update package.json version
run: |
TAG_NAME=${GITHUB_ENV##*/}
npm version --no-git-tag-version $TAG_NAME
- name: Commit changes
run: |
git config user.name ${{ vars.USERNAME_GIT}}
git config user.email ${{ vars.EMAIL_GIT}}
git add package.json
git commit -m "Update package.json version to $TAG_NAME"
git push origin HEAD
- name: Build Package Files
run: npm run package
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VSCODE_MARKETPALCE }}
registryUrl: https://marketplace.visualstudio.com