Manual VSCODE Release #8
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: Manual VSCODE Release | |
on: [workflow_dispatch] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- uses: DeterminateSystems/nix-installer-action@v4 | |
- uses: DeterminateSystems/magic-nix-cache-action@v2 | |
- name: Install NodeJS v21 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
cache: 'npm' | |
- name: Install Deps | |
run: nix run .#install | |
- name: Build Prod | |
run: npm run build-prod | |
- name: Lint | |
run: npm run lint | |
# install playwright | |
- name: Install Playwright | |
run: npx playwright install | |
# Run the desktop tests using headless setup | |
- name: Extension Test | |
uses: coactions/setup-xvfb@v1 | |
with: | |
run: npm test | |
- name: Git Config | |
run: | | |
git config --global user.email "${{ secrets.CI_GIT_EMAIL }}" | |
git config --global user.name "${{ secrets.CI_GIT_USER }}" | |
# bump version | |
- name: Bump Patch Version | |
run: echo "NEW_VERSION=$(npm version patch --no-git-tag-version)" >> $GITHUB_ENV | |
# Commit changes and tag | |
- name: Commit And Tag | |
run: | | |
git add "package.json" | |
git add "package-lock.json" | |
git commit -m "Release ${{ env.NEW_VERSION }}" | |
git tag ${{ env.NEW_VERSION }} | |
# Push the commit to remote | |
- name: Push Changes To Remote | |
run: | | |
git push origin | |
git push -u origin ${{ env.NEW_VERSION }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Create gitHub release with built package archives | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ env.NEW_VERSION }} | |
name: Release ${{ env.NEW_VERSION }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Publish an official version to vscode marketplace | |
- name: Official Publish To vscode Marketplace | |
run: y | npx vsce publish | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PAT }} |