1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-19 02:51:14 +02: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'
run: |
sudo snap install snapcraft --classic
echo "$SNAP_TOKEN" | snapcraft login --with -
env:
SNAP_TOKEN: ${{ secrets.SNAP_TOKEN }}
# echo "$SNAP_TOKEN" | snapcraft login --with -
#env:
# SNAP_TOKEN: ${{ secrets.SNAP_TOKEN }}
- name: Print environment
run: |
@ -109,17 +109,22 @@ jobs:
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.AppImage
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.AppImage
- name: Deploy to Snap Store
if: github.event_name == 'release'
run: |
./scripts/snap-update.ps1 -version $env:PACKAGE_VERSION
snapcraft logout
shell: pwsh
#- name: Deploy to Snap Store
# if: github.event_name == 'release'
# run: |
# ./scripts/snap-update.ps1 -version $env:PACKAGE_VERSION
# snapcraft logout
# shell: pwsh
windows:
runs-on: windows-latest
environment: test_ast
steps:
- name: Set up dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: "3.1.x"
- name: Set up Node
uses: actions/setup-node@v1
with:
@ -129,14 +134,34 @@ jobs:
run: echo "NODE_OPTIONS=--max_old_space_size=4096" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh
- name: Set up environment
if: github.event_name == 'release'
- name: Install AST
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 }}
cd $HOME
git clone https://github.com/vcsjones/AzureSignTool.git
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
run: |
@ -157,11 +182,29 @@ jobs:
- name: Run linter
run: npm run lint
- name: Build application
shell: pwsh
run: npm run dist:win:ci
- name: Build & Sign (dev)
if: github.event_name != 'release'
run: |
npm run build
npm run pack:win
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
shell: pwsh
@ -211,18 +254,18 @@ jobs:
name: bitwarden.${{ env.PACKAGE_VERSION }}.nupkg
path: ./dist/chocolatey/bitwarden.${{ env.PACKAGE_VERSION }}.nupkg
- name: Upload release assets
if: github.event_name == 'release'
run: |
hub release edit `
-a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx `
-a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx `
-m "$($env:RELEASE_TAG_NAME.TrimStart('v'))" `
$env:RELEASE_TAG_NAME
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
#- name: Upload release assets
# if: github.event_name == 'release'
# run: |
# hub release edit `
# -a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx `
# -a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx `
# -m "$($env:RELEASE_TAG_NAME.TrimStart('v'))" `
# $env:RELEASE_TAG_NAME
# shell: pwsh
# env:
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
macos:
runs-on: macos-latest