fix(ci): Update publish workflow (#80)

* Update workflow, bump vscode

* Remove BRANCH_NAME

* Change name
This commit is contained in:
InversionSpaces 2024-01-16 11:14:42 +01:00 committed by GitHub
parent 1c5d01cd97
commit 0ff680eb4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1698 additions and 3698 deletions

View File

@ -1,17 +1,14 @@
name: 'build and release vscode syntax highlight' name: 'Build and release Aqua VSCE'
on: on:
push: push:
# uncomment to release only on tags starting with 'v'
# tags:
# - "v*"
branches: branches:
- 'main' - 'main'
workflow_dispatch: workflow_dispatch:
jobs: jobs:
npm-publish: publish:
name: 'Publish' name: 'Publish'
runs-on: ubuntu-latest runs-on: ubuntu-latest
defaults: defaults:
@ -19,20 +16,9 @@ jobs:
shell: bash shell: bash
steps: steps:
### Extract branch name
- name: Extract branch name
if: github.event_name != 'pull_request'
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
id: extract_branch
- name: Extract branch name
if: github.event_name == 'pull_request'
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
### Calculate FINAL_VERSION
- name: Install jq - name: Install jq
run: sudo apt-get update && sudo apt-get --yes --force-yes install jq run: sudo apt-get update && sudo apt-get --yes --force-yes install jq
@ -46,30 +32,30 @@ jobs:
echo "PKG_NAME=$PKG_NAME" | tee -a $GITHUB_ENV echo "PKG_NAME=$PKG_NAME" | tee -a $GITHUB_ENV
echo "PKG_FILE=${PKG_NAME}-${VERSION}.vsix" | tee -a $GITHUB_ENV echo "PKG_FILE=${PKG_NAME}-${VERSION}.vsix" | tee -a $GITHUB_ENV
### Set version
- name: Set version to ${{ env.FINAL_VERSION }} - name: Set version to ${{ env.FINAL_VERSION }}
run: | run: |
yarn version --new-version ${{ env.FINAL_VERSION }} --no-git-tag-version yarn version --new-version ${{ env.FINAL_VERSION }} --no-git-tag-version
### Pack vsix package - name: Setup Node.js
- uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: '15' node-version: '18'
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- name: build package
- name: Package and publish
run: | run: |
npm i npm i
npm i -g vsce npm i -g vsce
vsce package vsce package
vsce publish -p ${{ secrets.VSCE_PAT }} vsce publish -p ${{ secrets.VSCE_PAT }}
### create release - name: Create release
- uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
tag_name: ${{ env.FINAL_VERSION }} tag_name: ${{ env.FINAL_VERSION }}
name: Visual Studio Code syntax highlight ${{ env.FINAL_VERSION }} name: Aqua VSCE ${{ env.FINAL_VERSION }}
body: | body: |
Version: ${{ env.FINAL_VERSION }} Version: ${{ env.FINAL_VERSION }}
files: | files: |

5360
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,7 @@
"aqua vscode extension" "aqua vscode extension"
], ],
"engines": { "engines": {
"vscode": "^1.50.0" "vscode": "^1.63.0"
}, },
"activationEvents": [ "activationEvents": [
"onLanguage:aqua" "onLanguage:aqua"