mirror of
https://github.com/bitwarden/desktop.git
synced 2025-01-07 18:58:37 +01:00
limit when steps run
This commit is contained in:
parent
989c135c4a
commit
694237536b
109
.github/workflows/build.yml
vendored
109
.github/workflows/build.yml
vendored
@ -56,14 +56,14 @@ jobs:
|
|||||||
run: ./.github/scripts/load-version.ps1
|
run: ./.github/scripts/load-version.ps1
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
- name: Cache node_modules
|
# - name: Cache node_modules
|
||||||
uses: actions/cache@v2
|
# uses: actions/cache@v2
|
||||||
with:
|
# with:
|
||||||
path: |
|
# path: |
|
||||||
~/.npm
|
# ~/.npm
|
||||||
~/.electron-gyp
|
# ~/.electron-gyp
|
||||||
node_modules
|
# node_modules
|
||||||
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
# key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
||||||
|
|
||||||
- name: Install Node dependencies
|
- name: Install Node dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
@ -131,14 +131,14 @@ jobs:
|
|||||||
run: ./.github/scripts/load-version.ps1
|
run: ./.github/scripts/load-version.ps1
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
- name: Cache node_modules
|
# - name: Cache node_modules
|
||||||
uses: actions/cache@v2
|
# uses: actions/cache@v2
|
||||||
with:
|
# with:
|
||||||
path: |
|
# path: |
|
||||||
~/.npm
|
# ~/.npm
|
||||||
~/.electron-gyp
|
# ~/.electron-gyp
|
||||||
node_modules
|
# node_modules
|
||||||
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
# key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
||||||
|
|
||||||
- name: Install Node dependencies
|
- name: Install Node dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
@ -186,9 +186,6 @@ jobs:
|
|||||||
- name: Set Node options
|
- name: Set Node options
|
||||||
run: echo "::set-env name=NODE_OPTIONS::--max_old_space_size=4096"
|
run: echo "::set-env name=NODE_OPTIONS::--max_old_space_size=4096"
|
||||||
|
|
||||||
- name: Set Debug
|
|
||||||
run: echo "::set-env name=DEBUG::electron-builder electron-osx-sign*"
|
|
||||||
|
|
||||||
- name: Print environment
|
- name: Print environment
|
||||||
run: |
|
run: |
|
||||||
node --version
|
node --version
|
||||||
@ -225,7 +222,6 @@ jobs:
|
|||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
- name: Increment version
|
- name: Increment version
|
||||||
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
|
||||||
run: ./.github/scripts/macos/increment-version.ps1
|
run: ./.github/scripts/macos/increment-version.ps1
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
@ -233,14 +229,14 @@ jobs:
|
|||||||
run: ./.github/scripts/load-version.ps1
|
run: ./.github/scripts/load-version.ps1
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
- name: Cache node_modules
|
# - name: Cache node_modules
|
||||||
uses: actions/cache@v2
|
# uses: actions/cache@v2
|
||||||
with:
|
# with:
|
||||||
path: |
|
# path: |
|
||||||
~/.npm
|
# ~/.npm
|
||||||
~/.electron-gyp
|
# ~/.electron-gyp
|
||||||
node_modules
|
# node_modules
|
||||||
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
# key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
||||||
|
|
||||||
- name: Install Node dependencies
|
- name: Install Node dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
@ -249,58 +245,73 @@ jobs:
|
|||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|
||||||
- name: Create Safari directory
|
- name: Create Safari directory
|
||||||
|
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
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
|
||||||
|
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: 'bitwarden/browser'
|
repository: 'bitwarden/browser'
|
||||||
path: 'dist-safari/browser'
|
path: 'dist-safari/browser'
|
||||||
|
|
||||||
- name: Build Safari extension
|
- name: Build Safari extension
|
||||||
|
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: ./scripts/safari-build.ps1 -skipcheckout -skipoutcopy
|
run: ./scripts/safari-build.ps1 -skipcheckout -skipoutcopy
|
||||||
|
|
||||||
# - name: Load Safari extension for .dmg
|
- name: Load Safari extension for .dmg
|
||||||
# shell: pwsh
|
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
||||||
# run: ./scripts/safari-build.ps1 -copyonly
|
shell: pwsh
|
||||||
#
|
run: ./scripts/safari-build.ps1 -copyonly
|
||||||
# - name: Build for .dmg
|
|
||||||
# run: npm run dist:mac
|
- name: Build
|
||||||
# env:
|
if: github.ref != 'refs/heads/master' && github.event_name != 'release'
|
||||||
# APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
run: npm run build
|
||||||
# APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
||||||
#
|
- name: Build for .dmg
|
||||||
# - name: Upload .zip artifact
|
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
||||||
# uses: actions/upload-artifact@v2
|
run: npm run dist:mac
|
||||||
# with:
|
env:
|
||||||
# name: Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip
|
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
||||||
# path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
#
|
|
||||||
# - name: Upload .dmg artifact
|
- name: Upload .zip artifact
|
||||||
# uses: actions/upload-artifact@v2
|
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
||||||
# with:
|
uses: actions/upload-artifact@v2
|
||||||
# name: Bitwarden-${{ env.PACKAGE_VERSION }}.dmg
|
with:
|
||||||
# path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}.dmg
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip
|
||||||
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip
|
||||||
|
|
||||||
|
- name: Upload .dmg artifact
|
||||||
|
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}.dmg
|
||||||
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}.dmg
|
||||||
|
|
||||||
- name: Load Safari extension for App Store
|
- name: Load Safari extension for App Store
|
||||||
|
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: ./scripts/safari-build.ps1 -mas -copyonly
|
run: ./scripts/safari-build.ps1 -mas -copyonly
|
||||||
|
|
||||||
- name: Build for App Store
|
- name: Build for App Store
|
||||||
|
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
||||||
run: npm run dist:mac:mas
|
run: npm run dist:mac:mas
|
||||||
env:
|
env:
|
||||||
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: Upload .pkg artifact
|
- name: Upload .pkg artifact
|
||||||
|
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}.pkg
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}.pkg
|
||||||
path: ./dist/mas/Bitwarden-${{ env.PACKAGE_VERSION }}.pkg
|
path: ./dist/mas/Bitwarden-${{ env.PACKAGE_VERSION }}.pkg
|
||||||
|
|
||||||
- name: Deploy to App Store
|
- name: Deploy to App Store
|
||||||
|
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
|
||||||
run: npm run upload:mas
|
run: npm run upload:mas
|
||||||
env:
|
env:
|
||||||
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
||||||
|
Loading…
Reference in New Issue
Block a user