-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
146 additions
and
153 deletions.
There are no files selected for viewing
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
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 }} |
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
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 }} |
This file was deleted.
Oops, something went wrong.