Deactivate marketplace skeleton #3
Workflow file for this run
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
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
# tags: | |
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
name: Create Release | |
jobs: | |
build: | |
name: Create Build | |
runs-on: ubuntu-latest | |
env: | |
PUSH_PACKAGES: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
steps: | |
- name: Install git-lfs | |
run: | | |
sudo apt install -y git-lfs | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
- name: npm ci | |
run: | | |
npm ci | |
- name: npm test [Linux] | |
run: | | |
xvfb-run -a npm test | |
if: runner.os == 'Linux' | |
- name: npm test [!Linux] | |
run: | | |
npm test | |
if: runner.os != 'Linux' | |
- name: Package vsix | |
run: | | |
npm run craft | |
# Release | |
- name: Get version from package.json and set in Env | |
if: ${{ env.PUSH_PACKAGES == 'true' }} | |
run: | | |
sudo apt install jq | |
echo "CORNIFER_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_ENV | |
- name: Create Release | |
if: ${{ env.PUSH_PACKAGES == 'true' }} | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ env.CORNIFER_VERSION }} | |
release_name: ${{ env.CORNIFER_VERSION }} | |
body: | | |
Please check `CHANGELOG.md` for latest fixes and updates. | |
draft: false | |
prerelease: false | |
- name: Upload Cornifer Artifact | |
if: ${{ env.PUSH_PACKAGES == 'true' }} | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: cornifer-${{ env.CORNIFER_VERSION }}.vsix | |
asset_name: cornifer-${{ env.CORNIFER_VERSION }}.vsix | |
asset_content_type: application |