mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-10 05:13:17 +00:00
Compare commits
7 Commits
renovate/n
...
v2.9.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3009890de | ||
|
|
e1f84df1d4 | ||
|
|
0014b8ce7d | ||
|
|
def3caa93b | ||
|
|
0b881a63d4 | ||
|
|
9dadfbd037 | ||
|
|
b0bf07d70e |
352
.github/workflows/build.yml
vendored
352
.github/workflows/build.yml
vendored
@@ -40,8 +40,186 @@ jobs:
|
|||||||
echo "::set-output name=package_version::$PKG_VERSION"
|
echo "::set-output name=package_version::$PKG_VERSION"
|
||||||
|
|
||||||
|
|
||||||
cli:
|
linux-cli:
|
||||||
name: CLI
|
name: Build Linux CLI
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: setup
|
||||||
|
env:
|
||||||
|
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
|
||||||
|
_PKG_FETCH_NODE_VERSION: 14.17.6
|
||||||
|
_PKG_FETCH_VERSION: 3.2
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
|
||||||
|
- name: Update NPM
|
||||||
|
run: |
|
||||||
|
npm install -g npm@7
|
||||||
|
npm install -g node-gyp
|
||||||
|
node-gyp install $(node -v)
|
||||||
|
|
||||||
|
- name: Get pkg-fetch
|
||||||
|
run: |
|
||||||
|
cd $HOME
|
||||||
|
fetchedUrl="https://github.com/vercel/pkg-fetch/releases/download/v$_PKG_FETCH_VERSION/node-v$_PKG_FETCH_NODE_VERSION-linux-x64"
|
||||||
|
|
||||||
|
mkdir -p .pkg-cache/v$_PKG_FETCH_VERSION
|
||||||
|
wget $fetchedUrl -O "./.pkg-cache/v$_PKG_FETCH_VERSION/fetched-v$_PKG_FETCH_NODE_VERSION-linux-x64"
|
||||||
|
|
||||||
|
- name: Keytar
|
||||||
|
run: |
|
||||||
|
keytarVersion=$(cat src/package.json | jq -r '.dependencies.keytar')
|
||||||
|
nodeModVersion=$(node -e "console.log(process.config.variables.node_module_version)")
|
||||||
|
keytarTar="keytar-v$keytarVersion-node-v$nodeModVersion-linux-x64.tar"
|
||||||
|
|
||||||
|
keytarTarGz="$keytarTar.gz"
|
||||||
|
keytarUrl="https://github.com/atom/node-keytar/releases/download/v$keytarVersion/$keytarTarGz"
|
||||||
|
|
||||||
|
mkdir -p ./keytar/linux
|
||||||
|
wget $keytarUrl -O ./keytar/linux/$keytarTarGz
|
||||||
|
tar -xvf ./keytar/linux/$keytarTarGz -C ./keytar/linux
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Package CLI
|
||||||
|
run: npm run dist:cli:lin
|
||||||
|
|
||||||
|
- name: Zip
|
||||||
|
run: |
|
||||||
|
zip -j ./dist-cli/bwdc-linux-$_PACKAGE_VERSION.zip ./dist-cli/linux/bwdc ./keytar/linux/build/Release/keytar.node
|
||||||
|
|
||||||
|
- name: Create checksums
|
||||||
|
run: |
|
||||||
|
sha256sum ./dist-cli/bwdc-linux-$_PACKAGE_VERSION.zip | cut -d " " -f 1 > ./dist-cli/bwdc-linux-sha256-$_PACKAGE_VERSION.txt
|
||||||
|
|
||||||
|
- name: Version Test
|
||||||
|
run: |
|
||||||
|
sudo apt install libsecret-1-0
|
||||||
|
|
||||||
|
mkdir -p test/linux
|
||||||
|
unzip ./dist-cli/bwdc-linux-$_PACKAGE_VERSION.zip -d ./test/linux
|
||||||
|
|
||||||
|
testVersion=$(./test/linux/bwdc -v)
|
||||||
|
|
||||||
|
echo "version: $_PACKAGE_VERSION"
|
||||||
|
echo "testVersion: $testVersion"
|
||||||
|
|
||||||
|
if [ "$testVersion" != "$_PACKAGE_VERSION" ]; then
|
||||||
|
echo "Version test failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload Linux Zip to GitHub
|
||||||
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
|
with:
|
||||||
|
name: bwdc-linux-${{ env._PACKAGE_VERSION }}.zip
|
||||||
|
path: ./dist-cli/bwdc-linux-${{ env._PACKAGE_VERSION }}.zip
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload Linux checksum to GitHub
|
||||||
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
|
with:
|
||||||
|
name: bwdc-linux-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||||
|
path: ./dist-cli/bwdc-linux-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
|
||||||
|
macos-cli:
|
||||||
|
name: Build Mac CLI
|
||||||
|
runs-on: macos-11
|
||||||
|
needs: setup
|
||||||
|
env:
|
||||||
|
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
|
||||||
|
_PKG_FETCH_NODE_VERSION: 14.17.6
|
||||||
|
_PKG_FETCH_VERSION: 3.2
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea
|
||||||
|
with:
|
||||||
|
node-version: '14'
|
||||||
|
|
||||||
|
- name: Update NPM
|
||||||
|
run: |
|
||||||
|
npm install -g npm@7
|
||||||
|
npm install -g node-gyp
|
||||||
|
node-gyp install $(node -v)
|
||||||
|
|
||||||
|
- name: Get pkg-fetch
|
||||||
|
run: |
|
||||||
|
cd $HOME
|
||||||
|
fetchedUrl="https://github.com/vercel/pkg-fetch/releases/download/v$_PKG_FETCH_VERSION/node-v$_PKG_FETCH_NODE_VERSION-macos-x64"
|
||||||
|
|
||||||
|
mkdir -p .pkg-cache/v$_PKG_FETCH_VERSION
|
||||||
|
wget $fetchedUrl -O "./.pkg-cache/v$_PKG_FETCH_VERSION/fetched-v$_PKG_FETCH_NODE_VERSION-macos-x64"
|
||||||
|
|
||||||
|
- name: Keytar
|
||||||
|
run: |
|
||||||
|
keytarVersion=$(cat src/package.json | jq -r '.dependencies.keytar')
|
||||||
|
nodeModVersion=$(node -e "console.log(process.config.variables.node_module_version)")
|
||||||
|
keytarTar="keytar-v$keytarVersion-node-v$nodeModVersion-darwin-x64.tar"
|
||||||
|
|
||||||
|
keytarTarGz="$keytarTar.gz"
|
||||||
|
keytarUrl="https://github.com/atom/node-keytar/releases/download/v$keytarVersion/$keytarTarGz"
|
||||||
|
|
||||||
|
mkdir -p ./keytar/macos
|
||||||
|
wget $keytarUrl -O ./keytar/macos/$keytarTarGz
|
||||||
|
tar -xvf ./keytar/macos/$keytarTarGz -C ./keytar/macos
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Package CLI
|
||||||
|
run: npm run dist:cli:mac
|
||||||
|
|
||||||
|
- name: Zip
|
||||||
|
run: |
|
||||||
|
zip -j ./dist-cli/bwdc-macos-$_PACKAGE_VERSION.zip ./dist-cli/macos/bwdc ./keytar/macos/build/Release/keytar.node
|
||||||
|
|
||||||
|
- name: Create checksums
|
||||||
|
run: |
|
||||||
|
sha256sum ./dist-cli/bwdc-macos-$_PACKAGE_VERSION.zip | cut -d " " -f 1 > ./dist-cli/bwdc-macos-sha256-$_PACKAGE_VERSION.txt
|
||||||
|
|
||||||
|
- name: Version Test
|
||||||
|
run: |
|
||||||
|
mkdir -p test/macos
|
||||||
|
unzip ./dist-cli/bwdc-macos-$_PACKAGE_VERSION.zip -d ./test/macos
|
||||||
|
|
||||||
|
testVersion=$(./test/macos/bwdc -v)
|
||||||
|
|
||||||
|
echo "version: $_PACKAGE_VERSION"
|
||||||
|
echo "testVersion: $testVersion"
|
||||||
|
|
||||||
|
if [ "$testVersion" != "$_PACKAGE_VERSION" ]; then
|
||||||
|
echo "Version test failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Upload Mac Zip to GitHub
|
||||||
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
|
with:
|
||||||
|
name: bwdc-macos-${{ env._PACKAGE_VERSION }}.zip
|
||||||
|
path: ./dist-cli/bwdc-macos-${{ env._PACKAGE_VERSION }}.zip
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload Mac checksum to GitHub
|
||||||
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
|
with:
|
||||||
|
name: bwdc-macos-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||||
|
path: ./dist-cli/bwdc-macos-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
|
||||||
|
windows-cli:
|
||||||
|
name: Build Windows CLI
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
needs: setup
|
needs: setup
|
||||||
env:
|
env:
|
||||||
@@ -68,13 +246,6 @@ jobs:
|
|||||||
npm install -g node-gyp
|
npm install -g node-gyp
|
||||||
node-gyp install $(node -v)
|
node-gyp install $(node -v)
|
||||||
|
|
||||||
- name: Setting WIN_PKG
|
|
||||||
run: |
|
|
||||||
echo "WIN_PKG=$env:WIN_PKG" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
||||||
echo "version: $env:pkgVersion"
|
|
||||||
env:
|
|
||||||
WIN_PKG: C:\Users\runneradmin\.pkg-cache\v3.0\fetched-v14.16.1-win-x64
|
|
||||||
|
|
||||||
- name: Get pkg-fetch
|
- name: Get pkg-fetch
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
@@ -95,20 +266,12 @@ jobs:
|
|||||||
$keytarTarGz = "${keytarTar}.gz"
|
$keytarTarGz = "${keytarTar}.gz"
|
||||||
$keytarUrl = "https://github.com/atom/node-keytar/releases/download/v${keytarVersion}/${keytarTarGz}"
|
$keytarUrl = "https://github.com/atom/node-keytar/releases/download/v${keytarVersion}/${keytarTarGz}"
|
||||||
|
|
||||||
New-Item -ItemType directory -Path ./keytar/macos | Out-Null
|
|
||||||
New-Item -ItemType directory -Path ./keytar/linux | Out-Null
|
|
||||||
New-Item -ItemType directory -Path ./keytar/windows | Out-Null
|
New-Item -ItemType directory -Path ./keytar/windows | Out-Null
|
||||||
|
|
||||||
Invoke-RestMethod -Uri $($keytarUrl -f "darwin") -OutFile "./keytar/macos/$($keytarTarGz -f "darwin")"
|
|
||||||
Invoke-RestMethod -Uri $($keytarUrl -f "linux") -OutFile "./keytar/linux/$($keytarTarGz -f "linux")"
|
|
||||||
Invoke-RestMethod -Uri $($keytarUrl -f "win32") -OutFile "./keytar/windows/$($keytarTarGz -f "win32")"
|
Invoke-RestMethod -Uri $($keytarUrl -f "win32") -OutFile "./keytar/windows/$($keytarTarGz -f "win32")"
|
||||||
|
|
||||||
7z e "./keytar/macos/$($keytarTarGz -f "darwin")" -o"./keytar/macos"
|
|
||||||
7z e "./keytar/linux/$($keytarTarGz -f "linux")" -o"./keytar/linux"
|
|
||||||
7z e "./keytar/windows/$($keytarTarGz -f "win32")" -o"./keytar/windows"
|
7z e "./keytar/windows/$($keytarTarGz -f "win32")" -o"./keytar/windows"
|
||||||
|
|
||||||
7z e "./keytar/macos/$($keytarTar -f "darwin")" -o"./keytar/macos"
|
|
||||||
7z e "./keytar/linux/$($keytarTar -f "linux")" -o"./keytar/linux"
|
|
||||||
7z e "./keytar/windows/$($keytarTar -f "win32")" -o"./keytar/windows"
|
7z e "./keytar/windows/$($keytarTar -f "win32")" -o"./keytar/windows"
|
||||||
|
|
||||||
- name: Setup Version Info
|
- name: Setup Version Info
|
||||||
@@ -163,14 +326,12 @@ jobs:
|
|||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Package CLI
|
- name: Package CLI
|
||||||
run: npm run dist:cli
|
run: npm run dist:cli:win
|
||||||
|
|
||||||
- name: Zip
|
- name: Zip
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
7z a ./dist-cli/bwdc-windows-%_PACKAGE_VERSION%.zip ./dist-cli/windows/bwdc.exe ./keytar/windows/keytar.node
|
7z a ./dist-cli/bwdc-windows-%_PACKAGE_VERSION%.zip ./dist-cli/windows/bwdc.exe ./keytar/windows/keytar.node
|
||||||
7z a ./dist-cli/bwdc-macos-%_PACKAGE_VERSION%.zip ./dist-cli/macos/bwdc ./keytar/macos/keytar.node
|
|
||||||
7z a ./dist-cli/bwdc-linux-%_PACKAGE_VERSION%.zip ./dist-cli/linux/bwdc ./keytar/linux/keytar.node
|
|
||||||
|
|
||||||
- name: Version Test
|
- name: Version Test
|
||||||
run: |
|
run: |
|
||||||
@@ -186,56 +347,24 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
checksum -f="./dist-cli/bwdc-windows-${env:_PACKAGE_VERSION}.zip" `
|
checksum -f="./dist-cli/bwdc-windows-${env:_PACKAGE_VERSION}.zip" `
|
||||||
-t sha256 | Out-File ./dist-cli/bwdc-windows-sha256-${env:_PACKAGE_VERSION}.txt
|
-t sha256 | Out-File ./dist-cli/bwdc-windows-sha256-${env:_PACKAGE_VERSION}.txt
|
||||||
checksum -f="./dist-cli/bwdc-macos-${env:_PACKAGE_VERSION}.zip" `
|
|
||||||
-t sha256 | Out-File ./dist-cli/bwdc-macos-sha256-${env:_PACKAGE_VERSION}.txt
|
|
||||||
checksum -f="./dist-cli/bwdc-linux-${env:_PACKAGE_VERSION}.zip" `
|
|
||||||
-t sha256 | Out-File ./dist-cli/bwdc-linux-sha256-${env:_PACKAGE_VERSION}.txt
|
|
||||||
|
|
||||||
- name: Upload Windows Zip to GitHub
|
- name: Upload Windows Zip to GitHub
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.4
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: bwdc-windows-${{ env._PACKAGE_VERSION }}.zip
|
name: bwdc-windows-${{ env._PACKAGE_VERSION }}.zip
|
||||||
path: ./dist-cli/bwdc-windows-${{ env._PACKAGE_VERSION }}.zip
|
path: ./dist-cli/bwdc-windows-${{ env._PACKAGE_VERSION }}.zip
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload Mac Zip to GitHub
|
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.4
|
|
||||||
with:
|
|
||||||
name: bwdc-macos-${{ env._PACKAGE_VERSION }}.zip
|
|
||||||
path: ./dist-cli/bwdc-macos-${{ env._PACKAGE_VERSION }}.zip
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
- name: Upload Linux Zip to GitHub
|
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.4
|
|
||||||
with:
|
|
||||||
name: bwdc-linux-${{ env._PACKAGE_VERSION }}.zip
|
|
||||||
path: ./dist-cli/bwdc-linux-${{ env._PACKAGE_VERSION }}.zip
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
- name: Upload Windows checksum to GitHub
|
- name: Upload Windows checksum to GitHub
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.4
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: bwdc-windows-sha256-${{ env._PACKAGE_VERSION }}.txt
|
name: bwdc-windows-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||||
path: ./dist-cli/bwdc-windows-sha256-${{ env._PACKAGE_VERSION }}.txt
|
path: ./dist-cli/bwdc-windows-sha256-${{ env._PACKAGE_VERSION }}.txt
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload Mac checksum to GitHub
|
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.4
|
|
||||||
with:
|
|
||||||
name: bwdc-macos-sha256-${{ env._PACKAGE_VERSION }}.txt
|
|
||||||
path: ./dist-cli/bwdc-macos-sha256-${{ env._PACKAGE_VERSION }}.txt
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
- name: Upload Linux checksum to GitHub
|
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.4
|
|
||||||
with:
|
|
||||||
name: bwdc-linux-sha256-${{ env._PACKAGE_VERSION }}.txt
|
|
||||||
path: ./dist-cli/bwdc-linux-sha256-${{ env._PACKAGE_VERSION }}.txt
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
|
|
||||||
windows-gui:
|
windows-gui:
|
||||||
name: Windows GUI
|
name: Build Windows GUI
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
needs: setup
|
needs: setup
|
||||||
env:
|
env:
|
||||||
@@ -293,22 +422,29 @@ jobs:
|
|||||||
run: dir ./dist
|
run: dir ./dist
|
||||||
|
|
||||||
- name: Upload Portable Executable to GitHub
|
- name: Upload Portable Executable to GitHub
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.4
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-Connector-Portable-${{ env._PACKAGE_VERSION }}.exe
|
name: Bitwarden-Connector-Portable-${{ env._PACKAGE_VERSION }}.exe
|
||||||
path: ./dist/Bitwarden-Connector-Portable-${{ env._PACKAGE_VERSION }}.exe
|
path: ./dist/Bitwarden-Connector-Portable-${{ env._PACKAGE_VERSION }}.exe
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload Installer Executable to GitHub
|
- name: Upload Installer Executable to GitHub
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.4
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe
|
name: Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe
|
||||||
path: ./dist/Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe
|
path: ./dist/Bitwarden-Connector-Installer-${{ env._PACKAGE_VERSION }}.exe
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload latest auto-update artifact
|
||||||
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
|
with:
|
||||||
|
name: latest.yml
|
||||||
|
path: ./dist/latest.yml
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
linux:
|
|
||||||
name: Linux
|
linux-gui:
|
||||||
|
name: Build Linux GUI
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: setup
|
needs: setup
|
||||||
env:
|
env:
|
||||||
@@ -347,15 +483,22 @@ jobs:
|
|||||||
run: npm run dist:lin
|
run: npm run dist:lin
|
||||||
|
|
||||||
- name: Upload AppImage
|
- name: Upload AppImage
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.4
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-x86_64.AppImage
|
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-x86_64.AppImage
|
||||||
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-x86_64.AppImage
|
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-x86_64.AppImage
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload latest auto-update artifact
|
||||||
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
|
with:
|
||||||
|
name: latest-linux.yml
|
||||||
|
path: ./dist/latest-linux.yml
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
macos:
|
|
||||||
name: MacOS
|
macos-gui:
|
||||||
|
name: Build MacOS GUI
|
||||||
runs-on: macos-11
|
runs-on: macos-11
|
||||||
needs: setup
|
needs: setup
|
||||||
env:
|
env:
|
||||||
@@ -445,16 +588,95 @@ jobs:
|
|||||||
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Rename Zip Artifact
|
||||||
|
run: |
|
||||||
|
cd dist
|
||||||
|
mv "Bitwarden Directory Connector-${{ env._PACKAGE_VERSION }}-mac.zip" \
|
||||||
|
"Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-mac.zip"
|
||||||
|
|
||||||
- name: Upload .zip artifact
|
- name: Upload .zip artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.4
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-mac.zip
|
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-mac.zip
|
||||||
path: ./dist/Bitwarden Directory Connector-${{ env._PACKAGE_VERSION }}-mac.zip
|
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}-mac.zip
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload .dmg artifact
|
- name: Upload .dmg artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.4
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg
|
name: Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg
|
||||||
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg
|
path: ./dist/Bitwarden-Connector-${{ env._PACKAGE_VERSION }}.dmg
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload latest auto-update artifact
|
||||||
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
|
with:
|
||||||
|
name: latest-mac.yml
|
||||||
|
path: ./dist/latest-mac.yml
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
|
||||||
|
check-failures:
|
||||||
|
name: Check for failures
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs:
|
||||||
|
- cloc
|
||||||
|
- setup
|
||||||
|
- linux-cli
|
||||||
|
- macos-cli
|
||||||
|
- windows-cli
|
||||||
|
- windows-gui
|
||||||
|
- linux-gui
|
||||||
|
- macos-gui
|
||||||
|
steps:
|
||||||
|
- name: Check if any job failed
|
||||||
|
if: ${{ (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/rc') }}
|
||||||
|
env:
|
||||||
|
CLOC_STATUS: ${{ needs.cloc.result }}
|
||||||
|
SETUP_STATUS: ${{ needs.setup.result }}
|
||||||
|
LINUX_CLI_STATUS: ${{ needs.linux-cli.result }}
|
||||||
|
MACOS_CLI_STATUS: ${{ needs.macos-cli.result }}
|
||||||
|
WINDOWS_CLI_STATUS: ${{ needs.windows-cli.result }}
|
||||||
|
WINDOWS_GUI_STATUS: ${{ needs.windows-gui.result }}
|
||||||
|
LINUX_GUI_STATUS: ${{ needs.linux-gui.result }}
|
||||||
|
MACOS_GUI_STATUS: ${{ needs.macos-gui.result }}
|
||||||
|
run: |
|
||||||
|
if [ "$CLOC_STATUS" = "failure" ]; then
|
||||||
|
exit 1
|
||||||
|
elif [ "$SETUP_STATUS" = "failure" ]; then
|
||||||
|
exit 1
|
||||||
|
elif [ "$LINUX_CLI_STATUS" = "failure" ]; then
|
||||||
|
exit 1
|
||||||
|
elif [ "$MACOS_CLI_STATUS" = "failure" ]; then
|
||||||
|
exit 1
|
||||||
|
elif [ "$WINDOWS_CLI_STATUS" = "failure" ]; then
|
||||||
|
exit 1
|
||||||
|
elif [ "$WINDOWS_GUI_STATUS" = "failure" ]; then
|
||||||
|
exit 1
|
||||||
|
elif [ "$LINUX_GUI_STATUS" = "failure" ]; then
|
||||||
|
exit 1
|
||||||
|
elif [ "$MACOS_GUI_STATUS" = "failure" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Login to Azure - Prod Subscription
|
||||||
|
uses: Azure/login@77f1b2e3fb80c0e8645114159d17008b8a2e475a
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
creds: ${{ secrets.AZURE_PROD_KV_CREDENTIALS }}
|
||||||
|
|
||||||
|
- name: Retrieve secrets
|
||||||
|
id: retrieve-secrets
|
||||||
|
uses: Azure/get-keyvault-secrets@80ccd3fafe5662407cc2e55f202ee34bfff8c403
|
||||||
|
if: failure()
|
||||||
|
with:
|
||||||
|
keyvault: "bitwarden-prod-kv"
|
||||||
|
secrets: "devops-alerts-slack-webhook-url"
|
||||||
|
|
||||||
|
- name: Notify Slack on failure
|
||||||
|
uses: act10ns/slack@e4e71685b9b239384b0f676a63c32367f59c2522 # v1.2.2
|
||||||
|
if: failure()
|
||||||
|
env:
|
||||||
|
SLACK_WEBHOOK_URL: ${{ steps.retrieve-secrets.outputs.devops-alerts-slack-webhook-url }}
|
||||||
|
with:
|
||||||
|
status: ${{ job.status }}
|
||||||
|
|||||||
13
.github/workflows/release.yml
vendored
13
.github/workflows/release.yml
vendored
@@ -11,9 +11,9 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Branch check
|
- name: Branch check
|
||||||
run: |
|
run: |
|
||||||
if [[ "$GITHUB_REF" != "refs/heads/rc" ]]; then
|
if [[ "$GITHUB_REF" != "refs/heads/release" ]]; then
|
||||||
echo "==================================="
|
echo "==================================="
|
||||||
echo "[!] Can only release from rc branch"
|
echo "[!] Can only release from the 'release' branch"
|
||||||
echo "==================================="
|
echo "==================================="
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||||
with:
|
with:
|
||||||
ref: rc
|
ref: release
|
||||||
|
|
||||||
- name: Retrieve Directory Connector release version
|
- name: Retrieve Directory Connector release version
|
||||||
id: retrieve-version
|
id: retrieve-version
|
||||||
@@ -49,7 +49,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
workflow: build.yml
|
workflow: build.yml
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: rc
|
branch: release
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: ncipollo/release-action@95215a3cb6e6a1908b3c44e00b4fdb15548b1e09 # v2.8.5
|
uses: ncipollo/release-action@95215a3cb6e6a1908b3c44e00b4fdb15548b1e09 # v2.8.5
|
||||||
@@ -66,7 +66,10 @@ jobs:
|
|||||||
./Bitwarden-Connector-Installer-${{ env.PKG_VERSION }}.exe,
|
./Bitwarden-Connector-Installer-${{ env.PKG_VERSION }}.exe,
|
||||||
./Bitwarden-Connector-${{ env.PKG_VERSION }}-x86_64.AppImage,
|
./Bitwarden-Connector-${{ env.PKG_VERSION }}-x86_64.AppImage,
|
||||||
./Bitwarden-Connector-${{ env.PKG_VERSION }}-mac.zip,
|
./Bitwarden-Connector-${{ env.PKG_VERSION }}-mac.zip,
|
||||||
./Bitwarden-Connector-${{ env.PKG_VERSION }}.dmg"
|
./Bitwarden-Connector-${{ env.PKG_VERSION }}.dmg,
|
||||||
|
./latest-linux.yml,
|
||||||
|
./latest-mac.yml,
|
||||||
|
./latest.yml"
|
||||||
commit: ${{ github.sha }}
|
commit: ${{ github.sha }}
|
||||||
tag: v${{ env.PKG_VERSION }}
|
tag: v${{ env.PKG_VERSION }}
|
||||||
name: Version ${{ env.PKG_VERSION }}
|
name: Version ${{ env.PKG_VERSION }}
|
||||||
|
|||||||
2
jslib
2
jslib
Submodule jslib updated: cb00604617...d28e762c55
@@ -96,6 +96,7 @@ export function initFactory(): Function {
|
|||||||
await environmentService.setUrlsFromStorage();
|
await environmentService.setUrlsFromStorage();
|
||||||
await i18nService.init();
|
await i18nService.init();
|
||||||
authService.init();
|
authService.init();
|
||||||
|
apiKeyService.migrateApiKeyStorage();
|
||||||
const htmlEl = window.document.documentElement;
|
const htmlEl = window.document.documentElement;
|
||||||
htmlEl.classList.add('os_' + platformUtilsService.getDeviceString());
|
htmlEl.classList.add('os_' + platformUtilsService.getDeviceString());
|
||||||
htmlEl.classList.add('locale_' + i18nService.translationLocale);
|
htmlEl.classList.add('locale_' + i18nService.translationLocale);
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ export class Main {
|
|||||||
|
|
||||||
private async init() {
|
private async init() {
|
||||||
await this.storageService.init();
|
await this.storageService.init();
|
||||||
|
await this.apiKeyService.migrateApiKeyStorage();
|
||||||
this.containerService.attachToWindow(global);
|
this.containerService.attachToWindow(global);
|
||||||
await this.environmentService.setUrlsFromStorage();
|
await this.environmentService.setUrlsFromStorage();
|
||||||
// Dev Server URLs. Comment out the line above.
|
// Dev Server URLs. Comment out the line above.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "bitwarden-directory-connector",
|
"name": "bitwarden-directory-connector",
|
||||||
"productName": "Bitwarden Directory Connector",
|
"productName": "Bitwarden Directory Connector",
|
||||||
"description": "Sync your user directory to your Bitwarden organization.",
|
"description": "Sync your user directory to your Bitwarden organization.",
|
||||||
"version": "2.9.6",
|
"version": "2.9.8",
|
||||||
"author": "Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)",
|
"author": "Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)",
|
||||||
"homepage": "https://bitwarden.com",
|
"homepage": "https://bitwarden.com",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ export class ApiService extends ApiServiceBase {
|
|||||||
private refreshTokenCallback: () => Promise<void>, logoutCallback: (expired: boolean) => Promise<void>,
|
private refreshTokenCallback: () => Promise<void>, logoutCallback: (expired: boolean) => Promise<void>,
|
||||||
customUserAgent: string = null) {
|
customUserAgent: string = null) {
|
||||||
super(tokenService, platformUtilsService, environmentService, logoutCallback, customUserAgent);
|
super(tokenService, platformUtilsService, environmentService, logoutCallback, customUserAgent);
|
||||||
|
this.apiKeyRefresh = (clientId: string, clientSecret: string) => this.doRefreshToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
doRefreshToken(): Promise<void> {
|
doRefreshToken(): Promise<void> {
|
||||||
|
|||||||
Reference in New Issue
Block a user