1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-29 06:33:40 +00:00

Fix workflow formatting (#17382)

This commit is contained in:
Vince Grassia
2025-11-13 21:56:37 -05:00
committed by GitHub
parent d95d86d05e
commit 9a3ba9e05b
5 changed files with 42 additions and 58 deletions

View File

@@ -66,15 +66,17 @@ jobs:
- name: Version output
id: version-output
env:
_INPUT_VERSION: ${{ inputs.version }}
INPUT_VERSION: ${{ inputs.version }}
run: |
if [[ "$_INPUT_VERSION" == "latest" || "$_INPUT_VERSION" == "" ]]; then
VERSION=$(curl "https://api.github.com/repos/bitwarden/clients/releases" | jq -c '.[] | select(.tag_name | contains("cli")) | .tag_name' | head -1 | grep -ohE '20[0-9]{2}\.([1-9]|1[0-2])\.[0-9]+')
if [[ "$INPUT_VERSION" == "latest" || "$INPUT_VERSION" == "" ]]; then
TAG_NAME=$(curl -s "https://api.github.com/repos/bitwarden/clients/releases" \
| jq -r '.[] | select(.tag_name | contains("cli")) | .tag_name' | head -1)
VERSION="${TAG_NAME#cli-v}"
echo "Latest Released Version: $VERSION"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
else
echo "Release Version: $_INPUT_VERSION"
echo "version=$_INPUT_VERSION" >> "$GITHUB_OUTPUT"
echo "Release Version: $INPUT_VERSION"
echo "version=$INPUT_VERSION" >> "$GITHUB_OUTPUT"
fi
- name: Create GitHub deployment
@@ -126,14 +128,14 @@ jobs:
uses: samuelmeuli/action-snapcraft@fceeb3c308e76f3487e72ef608618de625fb7fe8 # v3.0.1
- name: Download artifacts
run: wget "https://github.com/bitwarden/clients/releases/download/cli-v$_PKG_VERSION/bw_$_PKG_VERSION_amd64.snap"
run: wget "https://github.com/bitwarden/clients/releases/download/cli-v${_PKG_VERSION}/bw_${_PKG_VERSION}_amd64.snap"
- name: Publish Snap & logout
if: ${{ inputs.publish_type != 'Dry Run' }}
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ steps.retrieve-secrets.outputs.snapcraft-store-token }}
run: |
snapcraft upload "bw_$_PKG_VERSION_amd64.snap" --release stable
snapcraft upload "bw_${_PKG_VERSION}_amd64.snap" --release stable
snapcraft logout
choco:
@@ -179,7 +181,7 @@ jobs:
run: New-Item -ItemType directory -Path ./dist
- name: Download artifacts
run: Invoke-WebRequest -Uri "https://github.com/bitwarden/clients/releases/download/cli-v$_PKG_VERSION/bitwarden-cli.$_PKG_VERSION.nupkg" -OutFile bitwarden-cli.$_PKG_VERSION.nupkg
run: Invoke-WebRequest -Uri "https://github.com/bitwarden/clients/releases/download/cli-v$($env:_PKG_VERSION)/bitwarden-cli.$($env:_PKG_VERSION).nupkg" -OutFile bitwarden-cli.$($env:_PKG_VERSION).nupkg
working-directory: apps/cli/dist
- name: Push to Chocolatey
@@ -227,8 +229,8 @@ jobs:
- name: Download and set up artifact
run: |
mkdir -p build
wget "https://github.com/bitwarden/clients/releases/download/cli-v$_PKG_VERSION/bitwarden-cli-$_PKG_VERSION-npm-build.zip"
unzip "bitwarden-cli-$_PKG_VERSION-npm-build.zip" -d build
wget "https://github.com/bitwarden/clients/releases/download/cli-v${_PKG_VERSION}/bitwarden-cli-${_PKG_VERSION}-npm-build.zip"
unzip "bitwarden-cli-${_PKG_VERSION}-npm-build.zip" -d build
- name: Publish NPM
if: ${{ inputs.publish_type != 'Dry Run' }}