really fix attaching artifact? #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: Extension preview release | |
on: | |
workflow_dispatch: | |
push: | |
paths: [".github/workflows/extension-preview-release.yml", "vscExtension/src/*.js"] | |
jobs: | |
lint: | |
name: Extension preview release | |
runs-on: ubuntu-latest | |
steps: | |
- name: "☁️ checkout repository" | |
uses: actions/checkout@v4 | |
- name: "🔧 setup node" | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
cache: "npm" | |
- name: "🛵 set up env vars" | |
run: | | |
echo "SHA_SHORT=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" | |
echo "EXTENSION_VERSION=$(node -p -e "require('./vscExtension/package.json').version")" >> "$GITHUB_ENV" | |
- name: "🏁 build extension" | |
run: | | |
cd vscExtension | |
npm i --omit=optional --include=dev --no-fund --progress=false | |
npm run pack | |
- name: "🚀 release extension" | |
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 | |
with: | |
allowUpdates: true | |
artifactErrorsFailBuild: true | |
artifacts: vscExtension/out/pack-analyzer.vsix | |
body: | | |
This is an automatically generated **preview** release of the Pack Analyzer VS Code extension. | |
You can install it by downloading the `.vsix` file below and installing it in [Visual Studio Code](https://code.visualstudio.com) | |
or in e.g. VSCodium, using "Install from VSIX" on the extensions tab by clicking on the three dots. | |
Last commit: | |
- [`${{ env.SHA_SHORT }}`](https://github.com/DEVTomatoCake/Pack-Analyzer/commit/${{ github.sha }}) ${{ github.event.head_commit.message }} | |
commit: ${{ github.sha }} | |
makeLatest: false | |
prerelease: true | |
tag: ext-v${{ env.EXTENSION_VERSION }}-preview |