1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-24 12:06:15 +01:00

Merge pull request #10 from joseph-flinn/testing-update

Testing update
This commit is contained in:
Joseph Flinn 2021-01-15 12:23:21 -08:00 committed by GitHub
commit 6758847e5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,9 +47,9 @@ jobs:
if: github.event_name == 'release' if: github.event_name == 'release'
run: | run: |
sudo snap install snapcraft --classic sudo snap install snapcraft --classic
echo "$SNAP_TOKEN" | snapcraft login --with - # echo "$SNAP_TOKEN" | snapcraft login --with -
env: #env:
SNAP_TOKEN: ${{ secrets.SNAP_TOKEN }} # SNAP_TOKEN: ${{ secrets.SNAP_TOKEN }}
- name: Print environment - name: Print environment
run: | run: |
@ -109,17 +109,22 @@ jobs:
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.AppImage name: Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.AppImage
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.AppImage path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.AppImage
- name: Deploy to Snap Store #- name: Deploy to Snap Store
if: github.event_name == 'release' # if: github.event_name == 'release'
run: | # run: |
./scripts/snap-update.ps1 -version $env:PACKAGE_VERSION # ./scripts/snap-update.ps1 -version $env:PACKAGE_VERSION
snapcraft logout # snapcraft logout
shell: pwsh # shell: pwsh
windows: windows:
runs-on: windows-latest runs-on: windows-latest
environment: test_ast environment: test_ast
steps: steps:
- name: Set up dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: "3.1.x"
- name: Set up Node - name: Set up Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
@ -129,14 +134,34 @@ jobs:
run: echo "NODE_OPTIONS=--max_old_space_size=4096" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append run: echo "NODE_OPTIONS=--max_old_space_size=4096" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh shell: pwsh
- name: Set up environment - name: Install AST
if: github.event_name == 'release'
shell: pwsh shell: pwsh
run: | run: |
choco install checksum --no-progress cd $HOME
choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/
env: git clone https://github.com/vcsjones/AzureSignTool.git
CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }} cd AzureSignTool
$latest_head = $(git rev-parse HEAD)[0..9] -join ""
$latest_version = "0.0.0-g$latest_head"
Write-Host "--------"
Write-Host "git commit - $(git rev-parse HEAD)"
Write-Host "latest_head - $latest_head"
Write-Host "PACKAGE VERSION TO BUILD - $latest_version"
Write-Host "--------"
dotnet restore
dotnet pack --output ./nupkg
dotnet tool install --global --ignore-failed-sources --add-source ./nupkg --version $latest_version azuresigntool
#- name: Set up environment
# if: false && github.event_name == 'release'
# shell: pwsh
# run: |
# choco install checksum --no-progress
# choco apikey --key $env:CHOCO_API_KEY --source https://push.chocolatey.org/
# env:
# CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }}
- name: Print environment - name: Print environment
run: | run: |
@ -157,11 +182,29 @@ jobs:
- name: Run linter - name: Run linter
run: npm run lint run: npm run lint
- name: Build application - name: Build & Sign (dev)
shell: pwsh if: github.event_name != 'release'
run: npm run dist:win:ci run: |
npm run build
npm run pack:win
env: env:
ELECTRON_BUILDER_SIGN: 0 ELECTRON_BUILDER_SIGN: 1
SIGNING_VAULT_URL: ${{ secrets.SIGNING_VAULT_URL }}
SIGNING_CLIENT_ID: ${{ secrets.SIGNING_CLIENT_ID }}
SIGNING_TENANT_ID: ${{ secrets.SIGNING_TENANT_ID }}
SIGNING_CLIENT_SECRET: ${{ secrets.SIGNING_CLIENT_SECRET }}
SIGNING_CERT_NAME: ${{ secrets.SIGNING_CERT_NAME }}
- name: Build, Sign & Release
if: github.ref == 'release'
run: npm run publish:win
env:
ELECTRON_BUILDER_SIGN: 1
SIGNING_VAULT_URL: ${{ secrets.SIGNING_VAULT_URL }}
SIGNING_CLIENT_ID: ${{ secrets.SIGNING_CLIENT_ID }}
SIGNING_TENANT_ID: ${{ secrets.SIGNING_TENANT_ID }}
SIGNING_CLIENT_SECRET: ${{ secrets.SIGNING_CLIENT_SECRET }}
SIGNING_CERT_NAME: ${{ secrets.SIGNING_CERT_NAME }}
- name: Rename appx files for store - name: Rename appx files for store
shell: pwsh shell: pwsh
@ -211,18 +254,18 @@ jobs:
name: bitwarden.${{ env.PACKAGE_VERSION }}.nupkg name: bitwarden.${{ env.PACKAGE_VERSION }}.nupkg
path: ./dist/chocolatey/bitwarden.${{ env.PACKAGE_VERSION }}.nupkg path: ./dist/chocolatey/bitwarden.${{ env.PACKAGE_VERSION }}.nupkg
- name: Upload release assets #- name: Upload release assets
if: github.event_name == 'release' # if: github.event_name == 'release'
run: | # run: |
hub release edit ` # hub release edit `
-a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx ` # -a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx `
-a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx ` # -a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx `
-m "$($env:RELEASE_TAG_NAME.TrimStart('v'))" ` # -m "$($env:RELEASE_TAG_NAME.TrimStart('v'))" `
$env:RELEASE_TAG_NAME # $env:RELEASE_TAG_NAME
shell: pwsh # shell: pwsh
env: # env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
RELEASE_TAG_NAME: ${{ github.event.release.tag_name }} # RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
macos: macos:
runs-on: macos-latest runs-on: macos-latest