Skip to content

Commit

Permalink
release CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rouzwelt committed Feb 14, 2024
1 parent a997034 commit 235533e
Show file tree
Hide file tree
Showing 3 changed files with 146 additions and 153 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/manual-publish-official.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Manual NPM 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
run: nix run .#build

- name: Build Prod
run: nix develop -c npm run build-prod

- name: Lint
run: nix develop -c npm run lint

# install playwright
- name: Install Playwright
run: nix develop -c npx playwright install

# Run the desktop tests using headless setup
- name: Extension Test
uses: coactions/setup-xvfb@v1
with:
run: nix develop -c npm test

- 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=$(nix develop -c 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: nix develop -c y | npx vsce publish
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
73 changes: 73 additions & 0 deletions .github/workflows/manual-publish-pre-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Manual NPM 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
run: nix run .#build

- name: Build Prod
run: nix develop -c npm run build-prod

- name: Lint
run: nix develop -c npm run lint

# install playwright
- name: Install Playwright
run: nix develop -c npx playwright install

# Run the desktop tests using headless setup
- name: Desktop Extension Test
uses: coactions/setup-xvfb@v1
with:
run: nix develop -c npm test

- 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=$(nix develop -c 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 a pre-release version to vscode marketplace
- name: Pre-release Publish To vscode Marketplace
run: nixdevelop -c y | npx vsce publish --pre-release
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
153 changes: 0 additions & 153 deletions .github/workflows/standard-publish.yaml

This file was deleted.

0 comments on commit 235533e

Please sign in to comment.