Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Update bump version script to also bump browser package.json (#887)

Leendert de Borst771abe9cc147
diff --git a/.github/actions/build-browser-extension/action.yml b/.github/actions/build-browser-extension/action.yml
index 64b9b6233..07655d48e 100644
--- a/.github/actions/build-browser-extension/action.yml
+++ b/.github/actions/build-browser-extension/action.yml
@@ -43,11 +43,10 @@ runs:
shell: bash
working-directory: apps/browser-extension
- - name: Rename zip with semver
+ - name: Extract version
run: |
VERSION=$(node -p "require('./package.json').version")
echo "VERSION=$VERSION" >> $GITHUB_ENV
- mv dist/aliasvault-browser-extension-*-${{ inputs.browser }}.zip dist/aliasvault-browser-extension-${VERSION}-${{ inputs.browser }}.zip
shell: bash
working-directory: apps/browser-extension
@@ -76,7 +75,7 @@ runs:
if: ${{ inputs.browser == 'firefox' }}
uses: actions/upload-artifact@v4
with:
- name: aliasvault-browser-extension-sources-${{ env.VERSION }}
+ name: aliasvault-browser-extension-${{ env.VERSION }}-sources
path: apps/browser-extension/dist/sources-unpacked
- name: Upload to GitHub Release
@@ -85,9 +84,13 @@ runs:
with:
files: |
apps/browser-extension/dist/aliasvault-browser-extension-${{ env.VERSION }}-${{ inputs.browser }}.zip
+ env:
+ GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
- name: Upload Firefox sources to Release
if: ${{ inputs.upload_to_release == 'true' && inputs.browser == 'firefox' }}
uses: softprops/action-gh-release@v1
with:
files: apps/browser-extension/dist/aliasvault-browser-extension-${{ env.VERSION }}-sources.zip
+ env:
+ GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }}
diff --git a/.github/workflows/builds/browser-extension.yml b/.github/workflows/builds/browser-extension.yml
deleted file mode 100644
index bd2753c1a..000000000
--- a/.github/workflows/builds/browser-extension.yml
+++ /dev/null
@@ -1,93 +0,0 @@
-name: Browser Extension Build
-
-on:
- workflow_call:
- inputs:
- browser:
- required: true
- type: string
- upload_to_release:
- required: false
- type: boolean
- default: false
-
- outputs:
- sha_short:
- description: "Short SHA"
- value: ${{ jobs.build.outputs.sha_short }}
-
-jobs:
- build:
- runs-on: ubuntu-latest
- defaults:
- run:
- working-directory: apps/browser-extension
-
- outputs:
- sha_short: ${{ steps.vars.outputs.sha_short }}
-
- steps:
- - uses: actions/checkout@v4
-
- - name: Get short SHA
- id: vars
- run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
-
- - name: Setup Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
- cache: 'npm'
- cache-dependency-path: apps/browser-extension/package-lock.json
-
- - name: Install dependencies
- run: npm ci
-
- - name: Build extension
- run: npm run build:${{ inputs.browser }}
-
- - name: Run tests
- run: npm run test
-
- - name: Run linting
- run: npm run lint
-
- - name: Zip Extension
- run: npm run zip:${{ inputs.browser }}
-
- - name: Unzip extension for artifact
- run: |
- mkdir -p dist/${{ inputs.browser }}-unpacked
- unzip dist/aliasvault-browser-extension-*-${{ inputs.browser }}.zip -d dist/${{ inputs.browser }}-unpacked
-
- - name: Upload dist artifact
- uses: actions/upload-artifact@v4
- with:
- name: aliasvault-browser-extension-${{ github.ref_name }}-${{ inputs.browser }}
- path: apps/browser-extension/dist/${{ inputs.browser }}-unpacked
-
- - name: Upload to GitHub Release
- if: ${{ inputs.upload_to_release }}
- uses: softprops/action-gh-release@v2
- with:
- files: |
- apps/browser-extension/dist/aliasvault-browser-extension-*-${{ inputs.browser }}.zip
-
- - name: Unzip sources for Firefox (if applicable)
- if: ${{ inputs.browser == 'firefox' }}
- run: |
- mkdir -p dist/sources-unpacked
- unzip dist/aliasvault-browser-extension-*-sources.zip -d dist/sources-unpacked
-
- - name: Upload dist artifact Firefox sources
- if: ${{ inputs.browser == 'firefox' }}
- uses: actions/upload-artifact@v4
- with:
- name: aliasvault-browser-extension-${{ github.ref_name }}-sources
- path: apps/browser-extension/dist/sources-unpacked
-
- - name: Upload Firefox sources to Release
- if: ${{ inputs.browser == 'firefox' && inputs.upload_to_release }}
- uses: softprops/action-gh-release@v2
- with:
- files: apps/browser-extension/dist/aliasvault-browser-extension-*-sources.zip
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 314aa3893..e6149db95 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -24,39 +24,47 @@ jobs:
files: install.sh
token: ${{ secrets.GITHUB_TOKEN }}
- package-browser-extensions:
+ build-chrome-extension:
runs-on: ubuntu-latest
- defaults:
- run:
- working-directory: apps/browser-extension
steps:
- - uses: actions/checkout@v4
+ - name: Checkout repository
+ uses: actions/checkout@v4
- - name: Setup Node.js
- uses: actions/setup-node@v4
+ - name: Build Chrome Extension
+ uses: ./.github/actions/build-browser-extension
with:
- node-version: '20'
- cache: 'npm'
- cache-dependency-path: apps/browser-extension/package-lock.json
+ browser: chrome
+ upload_to_release: true
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: Install dependencies
- run: npm ci
+ build-firefox-extension:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
- - name: Zip extensions
- run: |
- npm run zip:chrome
- npm run zip:firefox
- npm run zip:edge
+ - name: Build Firefox Extension
+ uses: ./.github/actions/build-browser-extension
+ with:
+ browser: firefox
+ upload_to_release: true
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- - name: Upload extensions to release
- uses: softprops/action-gh-release@v2
+ build-edge-extension:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Build Edge Extension
+ uses: ./.github/actions/build-browser-extension
with:
- files: |
- apps/browser-extension/dist/aliasvault-browser-extension-*-chrome.zip
- apps/browser-extension/dist/aliasvault-browser-extension-*-firefox.zip
- apps/browser-extension/dist/aliasvault-browser-extension-*-edge.zip
- apps/browser-extension/dist/aliasvault-browser-extension-*-sources.zip
- token: ${{ secrets.GITHUB_TOKEN }}
+ browser: edge
+ upload_to_release: true
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-android-release:
runs-on: ubuntu-latest
@@ -120,109 +128,4 @@ jobs:
with:
name: aliasvault-app-android-${{ github.ref_name }}.aab
path: apps/mobile-app/android/app/build/outputs/bundle/release/app-release.aab
- retention-days: 14
-
- build-and-push-docker:
- runs-on: ubuntu-latest
- permissions:
- contents: read
- packages: write
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
-
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v3
-
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v3
-
- - name: Convert repository name to lowercase
- run: |
- echo "REPO_LOWER=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
-
- - name: Log in to the Container registry
- uses: docker/login-action@v3
- with:
- registry: ${{ env.REGISTRY }}
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Extract metadata
- id: meta
- uses: docker/metadata-action@v5
- with:
- images: ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}
-
- - name: Build and push Postgres image
- uses: docker/build-push-action@v5
- with:
- context: .
- file: apps/server/Databases/AliasServerDb/Dockerfile
- platforms: linux/amd64,linux/arm64/v8
- push: true
- tags: ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-postgres:latest,${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-postgres:${{ github.ref_name }}
-
- - name: Build and push API image
- uses: docker/build-push-action@v5
- with:
- context: .
- file: apps/server/AliasVault.Api/Dockerfile
- platforms: linux/amd64,linux/arm64/v8
- push: true
- tags: ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-api:latest,${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-api:${{ github.ref_name }}
-
- - name: Build and push Client image
- uses: docker/build-push-action@v5
- with:
- context: .
- file: apps/server/AliasVault.Client/Dockerfile
- platforms: linux/amd64,linux/arm64/v8
- push: true
- tags: ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-client:latest,${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-client:${{ github.ref_name }}
-
- - name: Build and push Admin image
- uses: docker/build-push-action@v5
- with:
- context: .
- file: apps/server/AliasVault.Admin/Dockerfile
- platforms: linux/amd64,linux/arm64/v8
- push: true
- tags: ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-admin:latest,${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-admin:${{ github.ref_name }}
-
- - name: Build and push Reverse Proxy image
- uses: docker/build-push-action@v5
- with:
- context: .
- file: apps/server/Dockerfile
- platforms: linux/amd64,linux/arm64/v8
- push: true
- tags: ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-reverse-proxy:latest,${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-reverse-proxy:${{ github.ref_name }}
-
- - name: Build and push SMTP image
- uses: docker/build-push-action@v5
- with:
- context: .
- file: apps/server/Services/AliasVault.SmtpService/Dockerfile
- platforms: linux/amd64,linux/arm64/v8
- push: true
- tags: ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-smtp:latest,${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-smtp:${{ github.ref_name }}
-
- - name: Build and push TaskRunner image
- uses: docker/build-push-action@v5
- with:
- context: .
- file: apps/server/Services/AliasVault.TaskRunner/Dockerfile
- platforms: linux/amd64,linux/arm64/v8
- push: true
- tags: ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-task-runner:latest,${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-task-runner:${{ github.ref_name }}
-
- - name: Build and push InstallCli image
- uses: docker/build-push-action@v5
- with:
- context: .
- file: apps/server/Utilities/AliasVault.InstallCli/Dockerfile
- platforms: linux/amd64,linux/arm64/v8
- push: true
- tags: ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-installcli:latest,${{ env.REGISTRY }}/${{ env.REPO_LOWER }}-installcli:${{ github.ref_name }}
\ No newline at end of file
+ retention-days: 14
\ No newline at end of file
diff --git a/apps/browser-extension/package.json b/apps/browser-extension/package.json
index 2c3fc7be8..071b0b755 100644
--- a/apps/browser-extension/package.json
+++ b/apps/browser-extension/package.json
@@ -2,7 +2,7 @@
"name": "aliasvault-browser-extension",
"description": "AliasVault Browser Extension",
"private": true,
- "version": "0.0.0",
+ "version": "0.18.0",
"type": "module",
"scripts": {
"dev:chrome": "wxt -b chrome",
diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh
index 8a6e75b9c..9c3984e09 100755
--- a/scripts/bump-version.sh
+++ b/scripts/bump-version.sh
@@ -80,6 +80,11 @@ get_browser_extension_version() {
grep "version: " ../apps/browser-extension/wxt.config.ts | head -n1 | tr -d '"' | tr -d ',' | tr -d ' ' | cut -d':' -f2
}
+# Function to extract version from browser extension package.json
+get_package_json_version() {
+ grep "\"version\": " ../apps/browser-extension/package.json | tr -d '"' | tr -d ',' | tr -d ' ' | cut -d':' -f2
+}
+
# Function to extract version from mobile app
get_mobile_app_version() {
grep "\"version\": " ../apps/mobile-app/app.json | tr -d '"' | tr -d ',' | tr -d ' ' | cut -d':' -f2
@@ -107,7 +112,8 @@ get_safari_version() {
# Check current versions
echo "Checking current versions..."
server_version=$(get_server_version)
-browser_version=$(get_browser_extension_version)
+browser_wxt_version=$(get_browser_extension_version)
+browser_package_version=$(get_package_json_version)
mobile_version=$(get_mobile_app_version)
mobile_ts_version=$(get_mobile_app_ts_version)
ios_version=$(get_ios_version)
@@ -117,7 +123,8 @@ safari_version=$(get_safari_version)
# Create associative array of versions
declare -A versions
versions["server"]="$server_version"
-versions["browser"]="$browser_version"
+versions["browser_wxt"]="$browser_wxt_version"
+versions["browser_package"]="$browser_package_version"
versions["mobile"]="$mobile_version"
versions["mobile_ts"]="$mobile_ts_version"
versions["ios"]="$ios_version"
@@ -127,7 +134,8 @@ versions["safari"]="$safari_version"
# Create display names for output
declare -A display_names
display_names["server"]="Server"
-display_names["browser"]="Browser Extension"
+display_names["browser_wxt"]="Browser Extension (wxt.config.ts)"
+display_names["browser_package"]="Browser Extension (package.json)"
display_names["mobile"]="Mobile App"
display_names["mobile_ts"]="Mobile App (TS)"
display_names["ios"]="iOS App"
@@ -195,6 +203,12 @@ update_version "../apps/browser-extension/wxt.config.ts" \
"version: \"[0-9]\+\.[0-9]\+\.[0-9]\+\"," \
"version: \"$version\","
+# Update package.json version
+echo "Updating package.json version..."
+update_version "../apps/browser-extension/package.json" \
+ "\"version\": \"[0-9]\+\.[0-9]\+\.[0-9]\+\"," \
+ "\"version\": \"$version\","
+
# Update generic mobile app version
echo "Updating mobile app version..."
update_version "../apps/mobile-app/utils/AppInfo.ts" \