mirror of
https://github.com/bitwarden/browser
synced 2025-12-26 13:13:22 +00:00
Update workflows with linter suggestions (#1056)
This commit is contained in:
65
.github/workflows/deploy.yml
vendored
65
.github/workflows/deploy.yml
vendored
@@ -1,6 +1,7 @@
|
||||
---
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release_tag_name_input:
|
||||
@@ -16,7 +17,7 @@ jobs:
|
||||
tag_version: ${{ steps.create_tags.outputs.tag_version }}
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||
|
||||
- name: Create Deploy version vars
|
||||
id: create_tags
|
||||
@@ -47,14 +48,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup
|
||||
env:
|
||||
PKG_VERSION: ${{ needs.setup.outputs.package_version }}
|
||||
TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
||||
_PKG_VERSION: ${{ needs.setup.outputs.package_version }}
|
||||
_TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||
|
||||
- name: Install Snap
|
||||
uses: samuelmeuli/action-snapcraft@10d7d0a84d9d86098b19f872257df314b0bd8e2d # v1.2.0
|
||||
uses: samuelmeuli/action-snapcraft@10d7d0a84d9d86098b19f872257df314b0bd8e2d # v1.2.0
|
||||
with:
|
||||
snapcraft_token: ${{ secrets.SNAP_TOKEN }}
|
||||
|
||||
@@ -62,11 +63,11 @@ jobs:
|
||||
run: mkdir dist
|
||||
|
||||
- name: Get Snap package
|
||||
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
||||
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
||||
with:
|
||||
mode: download
|
||||
tag_name: ${{ env.TAG_VERSION }}
|
||||
assets: bitwarden_${{ env.PKG_VERSION }}_amd64.snap|./dist/bitwarden_${{ env.PKG_VERSION }}_amd64.snap
|
||||
tag_name: ${{ env._TAG_VERSION }}
|
||||
assets: bitwarden_${{ env._PKG_VERSION }}_amd64.snap|./dist/bitwarden_${{ env._PKG_VERSION }}_amd64.snap
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Test
|
||||
@@ -74,7 +75,7 @@ jobs:
|
||||
|
||||
- name: Deploy to Snap Store
|
||||
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
|
||||
|
||||
|
||||
@@ -83,18 +84,18 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
needs: setup
|
||||
env:
|
||||
PKG_VERSION: ${{ needs.setup.outputs.package_version }}
|
||||
TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
||||
_PKG_VERSION: ${{ needs.setup.outputs.package_version }}
|
||||
_TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||
|
||||
- name: Get choco release asset
|
||||
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
||||
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
||||
with:
|
||||
mode: download
|
||||
tag_name: ${{ env.TAG_VERSION }}
|
||||
assets: bitwarden.${{ env.PKG_VERSION }}.nupkg
|
||||
tag_name: ${{ env._TAG_VERSION }}
|
||||
assets: bitwarden.${{ env._PKG_VERSION }}.nupkg
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Setup Chocolatey
|
||||
@@ -102,16 +103,16 @@ jobs:
|
||||
env:
|
||||
CHOCO_API_KEY: ${{ secrets.CHOCO_API_KEY }}
|
||||
|
||||
- name: Make dist dir
|
||||
- name: Make dist dir
|
||||
shell: pwsh
|
||||
run: New-Item -ItemType directory -Path ./dist
|
||||
|
||||
- name: Get nupkg
|
||||
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
||||
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
||||
with:
|
||||
mode: download
|
||||
tag_name: ${{ env.TAG_VERSION }}
|
||||
assets: bitwarden.${{ env.PKG_VERSION }}.nupkg|./dist/bitwarden.${{ env.PKG_VERSION }}.nupkg
|
||||
tag_name: ${{ env._TAG_VERSION }}
|
||||
assets: bitwarden.${{ env._PKG_VERSION }}.nupkg|./dist/bitwarden.${{ env._PKG_VERSION }}.nupkg
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Push to Chocolatey
|
||||
@@ -126,21 +127,21 @@ jobs:
|
||||
runs-on: macos-latest
|
||||
needs: setup
|
||||
env:
|
||||
PKG_VERSION: ${{ needs.setup.outputs.package_version }}
|
||||
TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
||||
_PKG_VERSION: ${{ needs.setup.outputs.package_version }}
|
||||
_TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||
|
||||
- name: Make target directory
|
||||
run: mkdir -p dist/mas-universal
|
||||
|
||||
- name: Get Mac release asset
|
||||
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
||||
uses: Xotl/cool-github-releases@16c58a5863d6ba9944f63ca8bb78bb3249ce1d81 # v1.1.6
|
||||
with:
|
||||
mode: download
|
||||
tag_name: ${{ env.TAG_VERSION }}
|
||||
assets: Bitwarden-${{ env.PKG_VERSION }}-universal.pkg|./dist/mas-universal/Bitwarden-${{ env.PKG_VERSION }}-universal.pkg
|
||||
tag_name: ${{ env._TAG_VERSION }}
|
||||
assets: Bitwarden-${{ env._PKG_VERSION }}-universal.pkg|./dist/mas-universal/Bitwarden-${{ env._PKG_VERSION }}-universal.pkg
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Deploy to App Store
|
||||
@@ -150,21 +151,19 @@ jobs:
|
||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||
|
||||
|
||||
|
||||
auto-updater-deploy:
|
||||
name: Release auto-updater files
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
needs:
|
||||
- setup
|
||||
- snap
|
||||
- choco
|
||||
- macos
|
||||
env:
|
||||
RELEASE_VERSION: ${{ needs.setup.outputs.release_version }}
|
||||
TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
||||
_TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||
|
||||
- name: Rename publish asset
|
||||
run: |
|
||||
@@ -172,7 +171,7 @@ jobs:
|
||||
-H "Authorization:token ${{ secrets.GITHUB_TOKEN }}" \
|
||||
-H "Accept:application/vnd.github.v3+json" \
|
||||
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:
|
||||
@@ -186,7 +185,7 @@ jobs:
|
||||
echo Release Assets:
|
||||
cat release_assets.jsonl
|
||||
|
||||
while read -r asset; do
|
||||
while read -r asset; do
|
||||
FILE_NAME=$(echo $asset | jq -r '.name')
|
||||
FILE_URL=$(echo $asset | jq -r '.url')
|
||||
FILE_ID=$(echo $asset | jq -r '.id')
|
||||
|
||||
Reference in New Issue
Block a user