mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
Update workflows with linter suggestions (#1056)
This commit is contained in:
101
.github/workflows/build.yml
vendored
101
.github/workflows/build.yml
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -12,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Set up cloc
|
- name: Set up cloc
|
||||||
run: |
|
run: |
|
||||||
@@ -27,16 +28,16 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
|
|
||||||
- name: Cache npm
|
- name: Cache npm
|
||||||
id: npm-cache
|
id: npm-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: '~/.npm'
|
path: '~/.npm'
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-npm-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-${{ github.run_id }}-npm-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -80,35 +81,35 @@ jobs:
|
|||||||
run: npm run dist:lin
|
run: npm run dist:lin
|
||||||
|
|
||||||
- name: Upload .deb artifact
|
- name: Upload .deb artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-amd64.deb
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-amd64.deb
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-amd64.deb
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-amd64.deb
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload .rpm artifact
|
- name: Upload .rpm artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.rpm
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.rpm
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.rpm
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.rpm
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload .freebsd artifact
|
- name: Upload .freebsd artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64.freebsd
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64.freebsd
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.freebsd
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.freebsd
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload .snap artifact
|
- name: Upload .snap artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap
|
name: bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap
|
||||||
path: ./dist/bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap
|
path: ./dist/bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload .AppImage artifact
|
- name: Upload .AppImage artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
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
|
||||||
@@ -119,21 +120,21 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Set up dotnet
|
- name: Set up dotnet
|
||||||
uses: actions/setup-dotnet@a71d1eb2c86af85faa8c772c03fb365e377e45ea # v1.8.0
|
uses: actions/setup-dotnet@a71d1eb2c86af85faa8c772c03fb365e377e45ea # v1.8.0
|
||||||
with:
|
with:
|
||||||
dotnet-version: "3.1.x"
|
dotnet-version: "3.1.x"
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
|
|
||||||
- name: Cache npm
|
- name: Cache npm
|
||||||
id: npm-cache
|
id: npm-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: '%AppData%/npm-cache'
|
path: '%AppData%/npm-cache'
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-npm-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-${{ github.run_id }}-npm-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -223,42 +224,42 @@ jobs:
|
|||||||
choco pack ./dist/chocolatey/bitwarden.nuspec --version "$env:PACKAGE_VERSION" --out ./dist/chocolatey
|
choco pack ./dist/chocolatey/bitwarden.nuspec --version "$env:PACKAGE_VERSION" --out ./dist/chocolatey
|
||||||
|
|
||||||
- name: Upload portable exe artifact
|
- name: Upload portable exe artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe
|
name: Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe
|
||||||
path: ./dist/Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe
|
path: ./dist/Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload installer exe artifact
|
- name: Upload installer exe artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe
|
name: Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe
|
||||||
path: ./dist/nsis-web/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe
|
path: ./dist/nsis-web/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload store appx ia32 artifact
|
- name: Upload store appx ia32 artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload store appx x64 artifact
|
- name: Upload store appx x64 artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload store appx ARM64 artifact
|
- name: Upload store appx ARM64 artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-arm64-store.appx
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-arm64-store.appx
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-arm64-store.appx
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-arm64-store.appx
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload nupkg artifact
|
- name: Upload nupkg artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
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
|
||||||
@@ -269,16 +270,16 @@ jobs:
|
|||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
|
|
||||||
- name: Cache npm
|
- name: Cache npm
|
||||||
id: npm-cache
|
id: npm-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: '~/.npm'
|
path: '~/.npm'
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-npm-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-${{ github.run_id }}-npm-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -299,16 +300,16 @@ jobs:
|
|||||||
echo "GitHub ref: $GITHUB_REF"
|
echo "GitHub ref: $GITHUB_REF"
|
||||||
echo "GitHub event: $GITHUB_EVENT"
|
echo "GitHub event: $GITHUB_EVENT"
|
||||||
|
|
||||||
- name: Cache Build
|
- name: Cache Build
|
||||||
id: build-cache
|
id: build-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: build
|
path: build
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-build
|
key: ${{ runner.os }}-${{ github.run_id }}-build
|
||||||
|
|
||||||
- name: Cache Safari
|
- name: Cache Safari
|
||||||
id: safari-cache
|
id: safari-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: dist-safari
|
path: dist-safari
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-safari-extension
|
key: ${{ runner.os }}-${{ github.run_id }}-safari-extension
|
||||||
@@ -356,7 +357,7 @@ jobs:
|
|||||||
run: New-Item ./dist-safari -ItemType Directory -ea 0
|
run: New-Item ./dist-safari -ItemType Directory -ea 0
|
||||||
|
|
||||||
- name: Checkout browser extension
|
- name: Checkout browser extension
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
with:
|
with:
|
||||||
repository: 'bitwarden/browser'
|
repository: 'bitwarden/browser'
|
||||||
path: 'dist-safari/browser'
|
path: 'dist-safari/browser'
|
||||||
@@ -372,16 +373,16 @@ jobs:
|
|||||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
|
|
||||||
- name: Cache npm
|
- name: Cache npm
|
||||||
id: npm-cache
|
id: npm-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: '~/.npm'
|
path: '~/.npm'
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-npm-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-${{ github.run_id }}-npm-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -404,14 +405,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Get Build Cache
|
- name: Get Build Cache
|
||||||
id: build-cache
|
id: build-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: build
|
path: build
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-build
|
key: ${{ runner.os }}-${{ github.run_id }}-build
|
||||||
|
|
||||||
- name: Setup Safari Cache
|
- name: Setup Safari Cache
|
||||||
id: safari-cache
|
id: safari-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: dist-safari
|
path: dist-safari
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-safari-extension
|
key: ${{ runner.os }}-${{ github.run_id }}-safari-extension
|
||||||
@@ -459,7 +460,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout browser extension
|
- name: Checkout browser extension
|
||||||
if: steps.safari-cache.outputs.cache-hit != 'true'
|
if: steps.safari-cache.outputs.cache-hit != 'true'
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
with:
|
with:
|
||||||
repository: 'bitwarden/browser'
|
repository: 'bitwarden/browser'
|
||||||
path: 'dist-safari/browser'
|
path: 'dist-safari/browser'
|
||||||
@@ -482,14 +483,14 @@ jobs:
|
|||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
|
|
||||||
- name: Upload .zip artifact
|
- name: Upload .zip artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip
|
path: ./dist/Bitwarden-${{ 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.3
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}.dmg
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}.dmg
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}.dmg
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}.dmg
|
||||||
@@ -502,16 +503,16 @@ jobs:
|
|||||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
|
|
||||||
- name: Cache npm
|
- name: Cache npm
|
||||||
id: npm-cache
|
id: npm-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: '~/.npm'
|
path: '~/.npm'
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-npm-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-${{ github.run_id }}-npm-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -534,14 +535,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Get Build Cache
|
- name: Get Build Cache
|
||||||
id: build-cache
|
id: build-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: build
|
path: build
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-build
|
key: ${{ runner.os }}-${{ github.run_id }}-build
|
||||||
|
|
||||||
- name: Setup Safari Cache
|
- name: Setup Safari Cache
|
||||||
id: safari-cache
|
id: safari-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: dist-safari
|
path: dist-safari
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-safari-extension
|
key: ${{ runner.os }}-${{ github.run_id }}-safari-extension
|
||||||
@@ -589,7 +590,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout browser extension
|
- name: Checkout browser extension
|
||||||
if: steps.safari-cache.outputs.cache-hit != 'true'
|
if: steps.safari-cache.outputs.cache-hit != 'true'
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
with:
|
with:
|
||||||
repository: 'bitwarden/browser'
|
repository: 'bitwarden/browser'
|
||||||
path: 'dist-safari/browser'
|
path: 'dist-safari/browser'
|
||||||
@@ -614,7 +615,7 @@ jobs:
|
|||||||
SDK_DIR: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/
|
SDK_DIR: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/
|
||||||
|
|
||||||
- name: Upload .pkg artifact
|
- name: Upload .pkg artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-universal.pkg
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-universal.pkg
|
||||||
path: ./dist/mas-universal/Bitwarden-${{ env.PACKAGE_VERSION }}-universal.pkg
|
path: ./dist/mas-universal/Bitwarden-${{ env.PACKAGE_VERSION }}-universal.pkg
|
||||||
@@ -622,21 +623,21 @@ jobs:
|
|||||||
|
|
||||||
macos-package-dev:
|
macos-package-dev:
|
||||||
name: MacOS Package Dev Release Asset
|
name: MacOS Package Dev Release Asset
|
||||||
if: false # We need to look into how code signing works for dev
|
if: false # We need to look into how code signing works for dev
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
needs: macos-build
|
needs: macos-build
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
|
|
||||||
- name: Cache npm
|
- name: Cache npm
|
||||||
id: npm-cache
|
id: npm-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: '~/.npm'
|
path: '~/.npm'
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-npm-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-${{ github.run_id }}-npm-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -659,14 +660,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Get Build Cache
|
- name: Get Build Cache
|
||||||
id: build-cache
|
id: build-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: build
|
path: build
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-build
|
key: ${{ runner.os }}-${{ github.run_id }}-build
|
||||||
|
|
||||||
- name: Setup Safari Cache
|
- name: Setup Safari Cache
|
||||||
id: safari-cache
|
id: safari-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: dist-safari
|
path: dist-safari
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-safari-extension
|
key: ${{ runner.os }}-${{ github.run_id }}-safari-extension
|
||||||
@@ -714,7 +715,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout browser extension
|
- name: Checkout browser extension
|
||||||
if: steps.safari-cache.outputs.cache-hit != 'true'
|
if: steps.safari-cache.outputs.cache-hit != 'true'
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
with:
|
with:
|
||||||
repository: 'bitwarden/browser'
|
repository: 'bitwarden/browser'
|
||||||
path: 'dist-safari/browser'
|
path: 'dist-safari/browser'
|
||||||
@@ -743,7 +744,7 @@ jobs:
|
|||||||
zip -r Bitwarden-${{ env.PACKAGE_VERSION }}-masdev-universal.zip Bitwarden.app
|
zip -r Bitwarden-${{ env.PACKAGE_VERSION }}-masdev-universal.zip Bitwarden.app
|
||||||
|
|
||||||
- name: Upload masdev artifact
|
- name: Upload masdev artifact
|
||||||
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # v2.2.3
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-masdev-universal.zip
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-masdev-universal.zip
|
||||||
path: ./dist/mas-universal/Bitwarden-${{ env.PACKAGE_VERSION }}-masdev-universal.zip
|
path: ./dist/mas-universal/Bitwarden-${{ env.PACKAGE_VERSION }}-masdev-universal.zip
|
||||||
|
|||||||
7
.github/workflows/crowndin-sync.yml
vendored
7
.github/workflows/crowndin-sync.yml
vendored
@@ -1,16 +1,17 @@
|
|||||||
|
---
|
||||||
name: Crowdin Sync
|
name: Crowdin Sync
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs: {}
|
inputs: {}
|
||||||
#schedule:
|
# schedule:
|
||||||
# - cron: '0 0 * * *'
|
# - cron: '0 0 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
crowdin-sync:
|
crowdin-sync:
|
||||||
name: Autosync
|
name: Autosync
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
env:
|
env:
|
||||||
_CROWDIN_PROJECT_ID: "299360"
|
_CROWDIN_PROJECT_ID: "299360"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
|
|||||||
65
.github/workflows/deploy.yml
vendored
65
.github/workflows/deploy.yml
vendored
@@ -1,6 +1,7 @@
|
|||||||
|
---
|
||||||
name: Deploy
|
name: Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
release_tag_name_input:
|
release_tag_name_input:
|
||||||
@@ -16,7 +17,7 @@ jobs:
|
|||||||
tag_version: ${{ steps.create_tags.outputs.tag_version }}
|
tag_version: ${{ steps.create_tags.outputs.tag_version }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Create Deploy version vars
|
- name: Create Deploy version vars
|
||||||
id: create_tags
|
id: create_tags
|
||||||
@@ -47,14 +48,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: setup
|
needs: setup
|
||||||
env:
|
env:
|
||||||
PKG_VERSION: ${{ needs.setup.outputs.package_version }}
|
_PKG_VERSION: ${{ needs.setup.outputs.package_version }}
|
||||||
TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
_TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Install Snap
|
- name: Install Snap
|
||||||
uses: samuelmeuli/action-snapcraft@10d7d0a84d9d86098b19f872257df314b0bd8e2d # v1.2.0
|
uses: samuelmeuli/action-snapcraft@10d7d0a84d9d86098b19f872257df314b0bd8e2d # v1.2.0
|
||||||
with:
|
with:
|
||||||
snapcraft_token: ${{ secrets.SNAP_TOKEN }}
|
snapcraft_token: ${{ secrets.SNAP_TOKEN }}
|
||||||
|
|
||||||
@@ -62,11 +63,11 @@ jobs:
|
|||||||
run: mkdir dist
|
run: mkdir dist
|
||||||
|
|
||||||
- name: Get Snap package
|
- name: Get Snap package
|
||||||
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
||||||
with:
|
with:
|
||||||
mode: download
|
mode: download
|
||||||
tag_name: ${{ env.TAG_VERSION }}
|
tag_name: ${{ env._TAG_VERSION }}
|
||||||
assets: bitwarden_${{ env.PKG_VERSION }}_amd64.snap|./dist/bitwarden_${{ env.PKG_VERSION }}_amd64.snap
|
assets: bitwarden_${{ env._PKG_VERSION }}_amd64.snap|./dist/bitwarden_${{ env._PKG_VERSION }}_amd64.snap
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
@@ -74,7 +75,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy to Snap Store
|
- name: Deploy to Snap Store
|
||||||
run: |
|
run: |
|
||||||
snapcraft upload dist/bitwarden_${{ env.PKG_VERSION }}_amd64.snap --release stable
|
snapcraft upload dist/bitwarden_${{ env._PKG_VERSION }}_amd64.snap --release stable
|
||||||
snapcraft logout
|
snapcraft logout
|
||||||
|
|
||||||
|
|
||||||
@@ -83,18 +84,18 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: setup
|
needs: setup
|
||||||
env:
|
env:
|
||||||
PKG_VERSION: ${{ needs.setup.outputs.package_version }}
|
_PKG_VERSION: ${{ needs.setup.outputs.package_version }}
|
||||||
TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
_TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Get choco release asset
|
- name: Get choco release asset
|
||||||
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
||||||
with:
|
with:
|
||||||
mode: download
|
mode: download
|
||||||
tag_name: ${{ env.TAG_VERSION }}
|
tag_name: ${{ env._TAG_VERSION }}
|
||||||
assets: bitwarden.${{ env.PKG_VERSION }}.nupkg
|
assets: bitwarden.${{ env._PKG_VERSION }}.nupkg
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Setup Chocolatey
|
- name: Setup Chocolatey
|
||||||
@@ -102,16 +103,16 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }}
|
CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }}
|
||||||
|
|
||||||
- name: Make dist dir
|
- name: Make dist dir
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: New-Item -ItemType directory -Path ./dist
|
run: New-Item -ItemType directory -Path ./dist
|
||||||
|
|
||||||
- name: Get nupkg
|
- name: Get nupkg
|
||||||
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
||||||
with:
|
with:
|
||||||
mode: download
|
mode: download
|
||||||
tag_name: ${{ env.TAG_VERSION }}
|
tag_name: ${{ env._TAG_VERSION }}
|
||||||
assets: bitwarden.${{ env.PKG_VERSION }}.nupkg|./dist/bitwarden.${{ env.PKG_VERSION }}.nupkg
|
assets: bitwarden.${{ env._PKG_VERSION }}.nupkg|./dist/bitwarden.${{ env._PKG_VERSION }}.nupkg
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Push to Chocolatey
|
- name: Push to Chocolatey
|
||||||
@@ -126,21 +127,21 @@ jobs:
|
|||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
needs: setup
|
needs: setup
|
||||||
env:
|
env:
|
||||||
PKG_VERSION: ${{ needs.setup.outputs.package_version }}
|
_PKG_VERSION: ${{ needs.setup.outputs.package_version }}
|
||||||
TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
_TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Make target directory
|
- name: Make target directory
|
||||||
run: mkdir -p dist/mas-universal
|
run: mkdir -p dist/mas-universal
|
||||||
|
|
||||||
- name: Get Mac release asset
|
- name: Get Mac release asset
|
||||||
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
||||||
with:
|
with:
|
||||||
mode: download
|
mode: download
|
||||||
tag_name: ${{ env.TAG_VERSION }}
|
tag_name: ${{ env._TAG_VERSION }}
|
||||||
assets: Bitwarden-${{ env.PKG_VERSION }}-universal.pkg|./dist/mas-universal/Bitwarden-${{ env.PKG_VERSION }}-universal.pkg
|
assets: Bitwarden-${{ env._PKG_VERSION }}-universal.pkg|./dist/mas-universal/Bitwarden-${{ env._PKG_VERSION }}-universal.pkg
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Deploy to App Store
|
- name: Deploy to App Store
|
||||||
@@ -150,21 +151,19 @@ jobs:
|
|||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auto-updater-deploy:
|
auto-updater-deploy:
|
||||||
name: Release auto-updater files
|
name: Release auto-updater files
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- setup
|
- setup
|
||||||
- snap
|
- snap
|
||||||
- choco
|
- choco
|
||||||
- macos
|
- macos
|
||||||
env:
|
env:
|
||||||
RELEASE_VERSION: ${{ needs.setup.outputs.release_version }}
|
_TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
||||||
TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Rename publish asset
|
- name: Rename publish asset
|
||||||
run: |
|
run: |
|
||||||
@@ -172,7 +171,7 @@ jobs:
|
|||||||
-H "Authorization:token ${{ secrets.GITHUB_TOKEN }}" \
|
-H "Authorization:token ${{ secrets.GITHUB_TOKEN }}" \
|
||||||
-H "Accept:application/vnd.github.v3+json" \
|
-H "Accept:application/vnd.github.v3+json" \
|
||||||
https://api.github.com/repos/$GITHUB_REPOSITORY/releases \
|
https://api.github.com/repos/$GITHUB_REPOSITORY/releases \
|
||||||
| jq -r " .[] | select( .tag_name == \"$TAG_VERSION\")" > release.json
|
| jq -r " .[] | select( .tag_name == \"$_TAG_VERSION\")" > release.json
|
||||||
|
|
||||||
echo "=====RELEASE====="
|
echo "=====RELEASE====="
|
||||||
echo Release:
|
echo Release:
|
||||||
@@ -186,7 +185,7 @@ jobs:
|
|||||||
echo Release Assets:
|
echo Release Assets:
|
||||||
cat release_assets.jsonl
|
cat release_assets.jsonl
|
||||||
|
|
||||||
while read -r asset; do
|
while read -r asset; do
|
||||||
FILE_NAME=$(echo $asset | jq -r '.name')
|
FILE_NAME=$(echo $asset | jq -r '.name')
|
||||||
FILE_URL=$(echo $asset | jq -r '.url')
|
FILE_URL=$(echo $asset | jq -r '.url')
|
||||||
FILE_ID=$(echo $asset | jq -r '.id')
|
FILE_ID=$(echo $asset | jq -r '.id')
|
||||||
|
|||||||
59
.github/workflows/release.yml
vendored
59
.github/workflows/release.yml
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -27,7 +28,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Create Release Vars
|
- name: Create Release Vars
|
||||||
id: create_tags
|
id: create_tags
|
||||||
@@ -50,7 +51,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create Draft Release
|
- name: Create Draft Release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1
|
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
@@ -65,16 +66,16 @@ jobs:
|
|||||||
needs: setup
|
needs: setup
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
|
|
||||||
- name: Cache Node Modules
|
- name: Cache Node Modules
|
||||||
id: node-modules-cache
|
id: node-modules-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: '**/node_modules'
|
path: '**/node_modules'
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-${{ github.run_id }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -120,21 +121,21 @@ jobs:
|
|||||||
needs: setup
|
needs: setup
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Set up dotnet
|
- name: Set up dotnet
|
||||||
uses: actions/setup-dotnet@a71d1eb2c86af85faa8c772c03fb365e377e45ea # v1.8.0
|
uses: actions/setup-dotnet@a71d1eb2c86af85faa8c772c03fb365e377e45ea # v1.8.0
|
||||||
with:
|
with:
|
||||||
dotnet-version: "3.1.x"
|
dotnet-version: "3.1.x"
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
|
|
||||||
- name: Cache Node Modules
|
- name: Cache Node Modules
|
||||||
id: node-modules-cache
|
id: node-modules-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: '**/node_modules'
|
path: '**/node_modules'
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-${{ github.run_id }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -219,7 +220,7 @@ jobs:
|
|||||||
cd ./dist/chocolatey
|
cd ./dist/chocolatey
|
||||||
|
|
||||||
- name: Upload Chocolatey nupkg release asset
|
- name: Upload Chocolatey nupkg release asset
|
||||||
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
@@ -234,16 +235,16 @@ jobs:
|
|||||||
needs: setup
|
needs: setup
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
|
|
||||||
- name: Cache Node Modules
|
- name: Cache Node Modules
|
||||||
id: node-modules-cache
|
id: node-modules-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: '**/node_modules'
|
path: '**/node_modules'
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-${{ github.run_id }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -284,7 +285,7 @@ jobs:
|
|||||||
run: npm run dist:win:ci
|
run: npm run dist:win:ci
|
||||||
|
|
||||||
- name: Upload unsigned ia32 Windows Store release asset
|
- name: Upload unsigned ia32 Windows Store release asset
|
||||||
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
@@ -294,7 +295,7 @@ jobs:
|
|||||||
asset_content_type: application
|
asset_content_type: application
|
||||||
|
|
||||||
- name: Upload unsigned x64 Windows Store release asset
|
- name: Upload unsigned x64 Windows Store release asset
|
||||||
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
@@ -304,7 +305,7 @@ jobs:
|
|||||||
asset_content_type: application
|
asset_content_type: application
|
||||||
|
|
||||||
- name: Upload unsigned ARM64 Windows Store release asset
|
- name: Upload unsigned ARM64 Windows Store release asset
|
||||||
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
@@ -319,16 +320,16 @@ jobs:
|
|||||||
needs: setup
|
needs: setup
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '14'
|
||||||
|
|
||||||
- name: Cache Node Modules
|
- name: Cache Node Modules
|
||||||
id: node-modules-cache
|
id: node-modules-cache
|
||||||
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
|
||||||
with:
|
with:
|
||||||
path: '**/node_modules'
|
path: '**/node_modules'
|
||||||
key: ${{ runner.os }}-${{ github.run_id }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-${{ github.run_id }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
@@ -390,7 +391,7 @@ jobs:
|
|||||||
run: New-Item ./dist-safari -ItemType Directory -ea 0
|
run: New-Item ./dist-safari -ItemType Directory -ea 0
|
||||||
|
|
||||||
- name: Checkout browser extension
|
- name: Checkout browser extension
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
with:
|
with:
|
||||||
repository: 'bitwarden/browser'
|
repository: 'bitwarden/browser'
|
||||||
ref: ${{ github.event.inputs.browser_extension_ref }}
|
ref: ${{ github.event.inputs.browser_extension_ref }}
|
||||||
@@ -424,7 +425,7 @@ jobs:
|
|||||||
SDK_DIR: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/
|
SDK_DIR: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/
|
||||||
|
|
||||||
- name: Upload Apple Store release asset
|
- name: Upload Apple Store release asset
|
||||||
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
@@ -435,16 +436,16 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
update-release-assets:
|
update-release-assets:
|
||||||
|
name: Update Release Assets
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- setup
|
- setup
|
||||||
- linux
|
- linux
|
||||||
env:
|
env:
|
||||||
PKG_VERSION: ${{ needs.setup.outputs.package_version }}
|
_TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
||||||
TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||||
|
|
||||||
- name: Rename publish asset
|
- name: Rename publish asset
|
||||||
run: |
|
run: |
|
||||||
@@ -452,7 +453,7 @@ jobs:
|
|||||||
-H "Authorization:token ${{ secrets.GITHUB_TOKEN }}" \
|
-H "Authorization:token ${{ secrets.GITHUB_TOKEN }}" \
|
||||||
-H "Accept:application/vnd.github.v3+json" \
|
-H "Accept:application/vnd.github.v3+json" \
|
||||||
https://api.github.com/repos/$GITHUB_REPOSITORY/releases \
|
https://api.github.com/repos/$GITHUB_REPOSITORY/releases \
|
||||||
| jq -r " .[] | select( .tag_name == \"$TAG_VERSION\")" > release.json
|
| jq -r " .[] | select( .tag_name == \"$_TAG_VERSION\")" > release.json
|
||||||
|
|
||||||
echo "=====RELEASE====="
|
echo "=====RELEASE====="
|
||||||
echo Release:
|
echo Release:
|
||||||
@@ -466,7 +467,7 @@ jobs:
|
|||||||
echo Release Assets:
|
echo Release Assets:
|
||||||
cat release_assets.jsonl
|
cat release_assets.jsonl
|
||||||
|
|
||||||
while read -r asset; do
|
while read -r asset; do
|
||||||
FILE_NAME=$(echo $asset | jq -r '.name')
|
FILE_NAME=$(echo $asset | jq -r '.name')
|
||||||
FILE_URL=$(echo $asset | jq -r '.url')
|
FILE_URL=$(echo $asset | jq -r '.url')
|
||||||
FILE_ID=$(echo $asset | jq -r '.id')
|
FILE_ID=$(echo $asset | jq -r '.id')
|
||||||
|
|||||||
Reference in New Issue
Block a user