2021-09-02 22:04:02 +02:00
|
|
|
---
|
2021-01-27 20:15:29 +01:00
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
release_tag_name_input:
|
|
|
|
description: "Release Tag Name <X.X.X>"
|
|
|
|
required: true
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
setup:
|
2021-09-02 22:04:02 +02:00
|
|
|
name: Setup
|
2021-09-21 16:23:06 +02:00
|
|
|
runs-on: ubuntu-20.04
|
2021-01-27 20:15:29 +01:00
|
|
|
outputs:
|
|
|
|
release_upload_url: ${{ steps.create_release.outputs.upload_url }}
|
2021-01-28 17:10:41 +01:00
|
|
|
package_version: ${{ steps.create_tags.outputs.package_version }}
|
|
|
|
tag_version: ${{ steps.create_tags.outputs.tag_version }}
|
2021-01-27 20:15:29 +01:00
|
|
|
steps:
|
2021-06-01 22:50:53 +02:00
|
|
|
- name: Branch check
|
|
|
|
run: |
|
|
|
|
if [[ "$GITHUB_REF" != "refs/heads/rc" ]]; then
|
|
|
|
echo "==================================="
|
|
|
|
echo "[!] Can only release from rc branch"
|
|
|
|
echo "==================================="
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-01-27 20:15:29 +01:00
|
|
|
- name: Checkout repo
|
2021-06-02 20:20:22 +02:00
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # 2.3.4
|
2021-01-27 20:15:29 +01:00
|
|
|
|
|
|
|
- name: Create Release Vars
|
|
|
|
id: create_tags
|
|
|
|
run: |
|
|
|
|
case "${RELEASE_TAG_NAME_INPUT:0:1}" in
|
|
|
|
v)
|
|
|
|
echo "RELEASE_NAME=${RELEASE_TAG_NAME_INPUT:1}" >> $GITHUB_ENV
|
|
|
|
echo "RELEASE_TAG_NAME=$RELEASE_TAG_NAME_INPUT" >> $GITHUB_ENV
|
2021-01-28 17:10:41 +01:00
|
|
|
echo "::set-output name=package_version::${RELEASE_TAG_NAME_INPUT:1}"
|
|
|
|
echo "::set-output name=tag_version::$RELEASE_TAG_NAME_INPUT"
|
2021-01-27 20:15:29 +01:00
|
|
|
;;
|
|
|
|
[0-9])
|
|
|
|
echo "RELEASE_NAME=$RELEASE_TAG_NAME_INPUT" >> $GITHUB_ENV
|
|
|
|
echo "RELEASE_TAG_NAME=v$RELEASE_TAG_NAME_INPUT" >> $GITHUB_ENV
|
2021-01-28 17:10:41 +01:00
|
|
|
echo "::set-output name=package_version::$RELEASE_TAG_NAME_INPUT"
|
2021-01-28 17:27:16 +01:00
|
|
|
echo "::set-output name=tag_version::v$RELEASE_TAG_NAME_INPUT"
|
2021-01-27 20:15:29 +01:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
env:
|
|
|
|
RELEASE_TAG_NAME_INPUT: ${{ github.event.inputs.release_tag_name_input }}
|
|
|
|
|
|
|
|
- name: Create Draft Release
|
|
|
|
id: create_release
|
2021-06-02 20:20:22 +02:00
|
|
|
uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # 1.1.4 - Repo Archived
|
2021-01-27 20:15:29 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ env.RELEASE_TAG_NAME }}
|
2021-08-24 20:57:58 +02:00
|
|
|
release_name: Version ${{ env.RELEASE_NAME }}
|
2021-01-27 20:15:29 +01:00
|
|
|
draft: true
|
|
|
|
prerelease: false
|
|
|
|
|
|
|
|
|
2021-01-28 16:22:16 +01:00
|
|
|
cli:
|
2021-01-27 20:15:29 +01:00
|
|
|
name: Build CLI
|
2021-09-21 16:23:06 +02:00
|
|
|
runs-on: windows-2019
|
2021-01-27 20:15:29 +01:00
|
|
|
needs: setup
|
2021-07-14 20:41:05 +02:00
|
|
|
env:
|
2021-09-02 22:04:02 +02:00
|
|
|
_WIN_PKG_FETCH_VERSION: 14.17.0
|
|
|
|
_WIN_PKG_VERSION: 3.1
|
2021-01-27 20:15:29 +01:00
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2021-06-30 18:24:49 +02:00
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # 2.3.4
|
2021-01-27 20:15:29 +01:00
|
|
|
|
|
|
|
- name: Setup Windows builder
|
|
|
|
run: |
|
|
|
|
choco install checksum --no-progress
|
|
|
|
choco install reshack --no-progress
|
|
|
|
|
|
|
|
- name: Set up Node
|
2021-06-02 20:20:22 +02:00
|
|
|
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # 2.1.5
|
2021-01-27 20:15:29 +01:00
|
|
|
with:
|
2021-05-14 14:30:26 +02:00
|
|
|
node-version: '14.x'
|
2021-01-27 20:15:29 +01:00
|
|
|
|
2021-05-26 22:34:39 +02:00
|
|
|
- name: Update NPM
|
|
|
|
run: |
|
|
|
|
npm install -g npm@7
|
|
|
|
|
2021-01-27 20:15:29 +01:00
|
|
|
- name: Set PACKAGE_VERSION & VER_INFO
|
|
|
|
run: |
|
2021-01-28 01:11:08 +01:00
|
|
|
$env:pkgVersion = (Get-Content -Raw -Path .\package.json | ConvertFrom-Json).version
|
2021-01-27 20:15:29 +01:00
|
|
|
echo "PACKAGE_VERSION=$env:pkgVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
|
|
echo "version: $env:pkgVersion"
|
|
|
|
|
2021-07-14 20:41:05 +02:00
|
|
|
- name: Get pkg-fetch
|
2021-01-27 20:15:29 +01:00
|
|
|
shell: pwsh
|
|
|
|
run: |
|
|
|
|
cd $HOME
|
2021-09-02 22:04:02 +02:00
|
|
|
$fetchedUrl = "https://github.com/vercel/pkg-fetch/releases/download/v$env:_WIN_PKG_VERSION/node-v$env:_WIN_PKG_FETCH_VERSION-win-x64"
|
2021-01-27 20:15:29 +01:00
|
|
|
|
|
|
|
New-Item -ItemType directory -Path .\.pkg-cache
|
2021-09-02 22:04:02 +02:00
|
|
|
New-Item -ItemType directory -Path .\.pkg-cache\v$env:_WIN_PKG_VERSION
|
|
|
|
Invoke-RestMethod -Uri $fetchedUrl -OutFile ".\.pkg-cache\v$env:_WIN_PKG_VERSION\fetched-v$env:_WIN_PKG_FETCH_VERSION-win-x64"
|
2021-01-27 20:15:29 +01:00
|
|
|
|
|
|
|
- name: Setup Version Info
|
|
|
|
shell: pwsh
|
|
|
|
run: ./scripts/make-versioninfo.ps1
|
|
|
|
|
2021-07-14 20:41:05 +02:00
|
|
|
# https://github.com/vercel/pkg-fetch/issues/188
|
2021-01-27 20:15:29 +01:00
|
|
|
- name: Resource Hacker
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
|
|
|
set PATH=%PATH%;C:\Program Files (x86)\Resource Hacker
|
2021-09-02 22:04:02 +02:00
|
|
|
set WIN_PKG=C:\Users\runneradmin\.pkg-cache\v%_WIN_PKG_VERSION%\fetched-v%_WIN_PKG_FETCH_VERSION%-win-x64
|
|
|
|
set WIN_PKG_BUILT=C:\Users\runneradmin\.pkg-cache\v%_WIN_PKG_VERSION%\built-v%_WIN_PKG_FETCH_VERSION%-win-x64
|
2021-07-14 20:41:05 +02:00
|
|
|
|
|
|
|
copy %WIN_PKG% %WIN_PKG_BUILT%
|
|
|
|
ResourceHacker -open %WIN_PKG_BUILT% -save %WIN_PKG_BUILT% -action delete -mask ICONGROUP,1,
|
2021-01-27 20:15:29 +01:00
|
|
|
ResourceHacker -open version-info.rc -save version-info.res -action compile
|
2021-07-14 20:41:05 +02:00
|
|
|
ResourceHacker -open %WIN_PKG_BUILT% -save %WIN_PKG_BUILT% -action addoverwrite -resource version-info.res
|
2021-01-27 20:15:29 +01:00
|
|
|
|
|
|
|
- name: Setup sub-module
|
|
|
|
run: npm run sub:init
|
2021-09-02 22:04:02 +02:00
|
|
|
|
2021-06-30 19:17:18 +02:00
|
|
|
- name: Install
|
|
|
|
run: npm install
|
2021-01-27 20:15:29 +01:00
|
|
|
|
|
|
|
- name: Build & Package
|
|
|
|
run: npm run dist
|
|
|
|
|
|
|
|
- name: Package Chocolatey
|
|
|
|
shell: pwsh
|
|
|
|
run: |
|
|
|
|
Copy-Item -Path stores/chocolatey -Destination dist/chocolatey -Recurse
|
|
|
|
Copy-Item dist/windows/bw.exe -Destination dist/chocolatey/tools
|
|
|
|
Copy-Item LICENSE.txt -Destination dist/chocolatey/tools
|
|
|
|
|
|
|
|
choco pack dist/chocolatey/bitwarden-cli.nuspec --version ${{ env.PACKAGE_VERSION }} --out dist/chocolatey
|
|
|
|
|
|
|
|
- name: Zip
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
|
|
|
7z a ./dist/bw-windows-%PACKAGE_VERSION%.zip ./dist/windows/bw.exe
|
|
|
|
7z a ./dist/bw-macos-%PACKAGE_VERSION%.zip ./dist/macos/bw
|
|
|
|
7z a ./dist/bw-linux-%PACKAGE_VERSION%.zip ./dist/linux/bw
|
|
|
|
|
|
|
|
- name: Version Test
|
|
|
|
run: |
|
|
|
|
dir ./dist/
|
|
|
|
Expand-Archive -Path "./dist/bw-windows-${env:PACKAGE_VERSION}.zip" -DestinationPath "./test/windows"
|
|
|
|
$testVersion = Invoke-Expression '& ./test/windows/bw.exe -v'
|
|
|
|
|
|
|
|
echo "version: $env:PACKAGE_VERSION"
|
|
|
|
echo "testVersion: $testVersion"
|
|
|
|
if($testVersion -ne $env:PACKAGE_VERSION) {
|
|
|
|
Throw "Version test failed."
|
|
|
|
}
|
|
|
|
|
|
|
|
- name: Create checksums
|
|
|
|
run: |
|
|
|
|
checksum -f="./dist/bw-windows-${env:PACKAGE_VERSION}.zip" `
|
|
|
|
-t sha256 | Out-File -Encoding ASCII ./dist/bw-windows-sha256-${env:PACKAGE_VERSION}.txt
|
|
|
|
checksum -f="./dist/bw-macos-${env:PACKAGE_VERSION}.zip" `
|
|
|
|
-t sha256 | Out-File -Encoding ASCII ./dist/bw-macos-sha256-${env:PACKAGE_VERSION}.txt
|
|
|
|
checksum -f="./dist/bw-linux-${env:PACKAGE_VERSION}.zip" `
|
|
|
|
-t sha256 | Out-File -Encoding ASCII ./dist/bw-linux-sha256-${env:PACKAGE_VERSION}.txt
|
|
|
|
|
2021-07-14 20:41:05 +02:00
|
|
|
- name: Build artifact - linux zip
|
2021-06-02 20:20:22 +02:00
|
|
|
uses: actions/upload-artifact@ee69f02b3dfdecd58bb31b4d133da38ba6fe3700 # 2.2.3
|
2021-01-28 17:42:01 +01:00
|
|
|
with:
|
|
|
|
name: bw-linux-${{ env.PACKAGE_VERSION }}.zip
|
|
|
|
path: ./dist/bw-linux-${{ env.PACKAGE_VERSION }}.zip
|
|
|
|
|
2021-07-14 20:41:05 +02:00
|
|
|
- name: Upload windows zip release asset
|
2021-01-27 20:15:29 +01:00
|
|
|
id: upload-windows-zip
|
2021-06-02 20:20:22 +02:00
|
|
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # 1.0.2 - Archived
|
2021-01-27 20:15:29 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ needs.setup.outputs.release_upload_url }}
|
|
|
|
asset_name: bw-windows-${{ env.PACKAGE_VERSION }}.zip
|
|
|
|
asset_path: ./dist/bw-windows-${{ env.PACKAGE_VERSION }}.zip
|
2021-01-28 16:23:37 +01:00
|
|
|
asset_content_type: application/zip
|
2021-01-27 20:15:29 +01:00
|
|
|
|
2021-07-14 20:41:05 +02:00
|
|
|
- name: Upload macos zip release asset
|
2021-01-27 20:15:29 +01:00
|
|
|
id: upload-macos-zip
|
2021-06-02 20:20:22 +02:00
|
|
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # 1.0.2 - Archived
|
2021-01-27 20:15:29 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ needs.setup.outputs.release_upload_url }}
|
|
|
|
asset_name: bw-macos-${{ env.PACKAGE_VERSION }}.zip
|
|
|
|
asset_path: ./dist/bw-macos-${{ env.PACKAGE_VERSION }}.zip
|
2021-01-28 16:23:37 +01:00
|
|
|
asset_content_type: application/zip
|
2021-01-27 20:15:29 +01:00
|
|
|
|
2021-07-14 20:41:05 +02:00
|
|
|
- name: Upload linux zip release asset
|
2021-01-27 20:15:29 +01:00
|
|
|
id: upload-linux-zip
|
2021-06-02 20:20:22 +02:00
|
|
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # 1.0.2 - Archived
|
2021-01-27 20:15:29 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ needs.setup.outputs.release_upload_url }}
|
|
|
|
asset_name: bw-linux-${{ env.PACKAGE_VERSION }}.zip
|
|
|
|
asset_path: ./dist/bw-linux-${{ env.PACKAGE_VERSION }}.zip
|
2021-01-28 16:23:37 +01:00
|
|
|
asset_content_type: application/zip
|
2021-01-27 20:15:29 +01:00
|
|
|
|
|
|
|
- name: Upload windows checksum release asset
|
|
|
|
id: upload-windows-checksum
|
2021-06-02 20:20:22 +02:00
|
|
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # 1.0.2 - Archived
|
2021-01-27 20:15:29 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ needs.setup.outputs.release_upload_url }}
|
|
|
|
asset_name: bw-windows-sha256-${{ env.PACKAGE_VERSION }}.txt
|
|
|
|
asset_path: ./dist/bw-windows-sha256-${{ env.PACKAGE_VERSION }}.txt
|
2021-01-28 16:23:37 +01:00
|
|
|
asset_content_type: plain/text
|
2021-01-27 20:15:29 +01:00
|
|
|
|
|
|
|
- name: Upload macos checksum release asset
|
|
|
|
id: upload-macos-checksum
|
2021-06-02 20:20:22 +02:00
|
|
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # 1.0.2 - Archived
|
2021-01-27 20:15:29 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ needs.setup.outputs.release_upload_url }}
|
|
|
|
asset_name: bw-macos-sha256-${{ env.PACKAGE_VERSION }}.txt
|
|
|
|
asset_path: ./dist/bw-macos-sha256-${{ env.PACKAGE_VERSION }}.txt
|
2021-01-28 16:23:37 +01:00
|
|
|
asset_content_type: plain/text
|
2021-01-27 20:15:29 +01:00
|
|
|
|
|
|
|
- name: Upload linux checksum release asset
|
|
|
|
id: upload-linux-checksum
|
2021-06-02 20:20:22 +02:00
|
|
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # 1.0.2 - Archived
|
2021-01-27 20:15:29 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ needs.setup.outputs.release_upload_url }}
|
|
|
|
asset_name: bw-linux-sha256-${{ env.PACKAGE_VERSION }}.txt
|
|
|
|
asset_path: ./dist/bw-linux-sha256-${{ env.PACKAGE_VERSION }}.txt
|
2021-01-28 16:23:37 +01:00
|
|
|
asset_content_type: plain/text
|
2021-01-27 20:15:29 +01:00
|
|
|
|
|
|
|
- name: Upload chocolatey nupkg release asset
|
|
|
|
id: upload-choco-nupkg
|
2021-06-02 20:20:22 +02:00
|
|
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # 1.0.2 - Archived
|
2021-01-27 20:15:29 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ needs.setup.outputs.release_upload_url }}
|
|
|
|
asset_name: bitwarden-cli.${{ env.PACKAGE_VERSION }}.nupkg
|
|
|
|
asset_path: ./dist/chocolatey/bitwarden-cli.${{ env.PACKAGE_VERSION }}.nupkg
|
2021-01-28 16:23:37 +01:00
|
|
|
asset_content_type: application
|
2021-01-27 20:15:29 +01:00
|
|
|
|
|
|
|
|
2021-01-28 16:22:16 +01:00
|
|
|
snap:
|
2021-01-28 16:53:54 +01:00
|
|
|
name: Release Snap
|
2021-09-21 16:23:06 +02:00
|
|
|
runs-on: ubuntu-20.04
|
2021-09-02 22:04:02 +02:00
|
|
|
needs:
|
2021-01-28 16:22:16 +01:00
|
|
|
- setup
|
|
|
|
- cli
|
2021-01-28 16:44:27 +01:00
|
|
|
env:
|
2021-09-02 22:04:02 +02:00
|
|
|
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
|
2021-01-27 20:15:29 +01:00
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2021-06-02 20:20:22 +02:00
|
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # 2.3.4
|
2021-01-27 20:15:29 +01:00
|
|
|
|
|
|
|
- name: Print environment
|
|
|
|
run: |
|
|
|
|
whoami
|
|
|
|
echo "GitHub ref: $GITHUB_REF"
|
|
|
|
echo "GitHub event: $GITHUB_EVENT"
|
2021-09-02 22:04:02 +02:00
|
|
|
echo "BW Package Version: $_PACKAGE_VERSION"
|
2021-01-27 20:15:29 +01:00
|
|
|
env:
|
|
|
|
GITHUB_REF: ${{ github.ref }}
|
|
|
|
GITHUB_EVENT: ${{ github.event_name }}
|
|
|
|
|
2021-07-14 20:41:05 +02:00
|
|
|
- name: Get linux zip artifact
|
2021-06-02 20:20:22 +02:00
|
|
|
uses: actions/download-artifact@158ca71f7c614ae705e79f25522ef4658df18253 # 2.0.9
|
2021-01-28 17:42:01 +01:00
|
|
|
with:
|
2021-09-02 22:04:02 +02:00
|
|
|
name: bw-linux-${{ env._PACKAGE_VERSION }}.zip
|
2021-01-28 17:42:01 +01:00
|
|
|
path: ./dist/snap
|
|
|
|
|
2021-08-12 19:04:37 +02:00
|
|
|
- name: Setup Snap Package
|
2021-01-27 20:15:29 +01:00
|
|
|
run: |
|
2021-01-28 17:42:01 +01:00
|
|
|
cp -r stores/snap/* -t dist/snap
|
2021-09-02 22:04:02 +02:00
|
|
|
sed -i s/__version__/${{ env._PACKAGE_VERSION }}/g dist/snap/snapcraft.yaml
|
|
|
|
|
2021-01-28 01:09:02 +01:00
|
|
|
cd dist/snap
|
|
|
|
ls -alth
|
2021-01-27 20:15:29 +01:00
|
|
|
|
2021-08-12 00:38:05 +02:00
|
|
|
- name: Build snap
|
2021-09-21 16:23:06 +02:00
|
|
|
uses: snapcore/action-build@a400bf1c2d0f23074aaacf08a144813c3c20b35d # v1.0.9
|
2021-08-12 00:38:05 +02:00
|
|
|
with:
|
|
|
|
path: dist/snap
|
|
|
|
|
|
|
|
- name: Create checksum
|
|
|
|
run: |
|
|
|
|
cd dist/snap
|
|
|
|
ls -alth
|
2021-09-21 16:23:06 +02:00
|
|
|
sha256sum bw_${{ env._PACKAGE_VERSION }}_amd64.snap \
|
|
|
|
| awk '{split($0, a); print a[1]}' > bw-snap-sha256-${{ env._PACKAGE_VERSION }}.txt
|
2021-01-27 20:15:29 +01:00
|
|
|
|
2021-09-02 22:04:02 +02:00
|
|
|
- name: Install Snap
|
2021-01-27 20:15:29 +01:00
|
|
|
run: sudo snap install ./dist/snap/bw*.snap --dangerous
|
|
|
|
|
|
|
|
- name: Test Snap
|
|
|
|
shell: pwsh
|
|
|
|
run: |
|
|
|
|
$testVersion = Invoke-Expression '& bw -v'
|
2021-09-02 22:04:02 +02:00
|
|
|
if($testVersion -ne $env:_PACKAGE_VERSION) {
|
2021-01-27 20:15:29 +01:00
|
|
|
Throw "Version test failed."
|
|
|
|
}
|
2021-05-11 22:18:27 +02:00
|
|
|
env:
|
|
|
|
BITWARDENCLI_APPDATA_DIR: "/home/runner/snap/bw/x1/.config/Bitwarden CLI"
|
2021-01-27 20:15:29 +01:00
|
|
|
|
|
|
|
- name: Cleanup Test & Update Snap for Publish
|
|
|
|
shell: pwsh
|
|
|
|
run: |
|
|
|
|
sudo snap remove bw
|
|
|
|
|
|
|
|
- name: Upload snap release asset
|
2021-06-02 20:20:22 +02:00
|
|
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # 1.0.2 - Archived
|
2021-01-27 20:15:29 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ needs.setup.outputs.release_upload_url }}
|
2021-09-02 22:04:02 +02:00
|
|
|
asset_name: bw_${{ env._PACKAGE_VERSION }}_amd64.snap
|
|
|
|
asset_path: ./dist/snap/bw_${{ env._PACKAGE_VERSION }}_amd64.snap
|
2021-01-28 18:15:45 +01:00
|
|
|
asset_content_type: application
|
2021-01-27 20:15:29 +01:00
|
|
|
|
|
|
|
- name: Upload snap checksum release asset
|
2021-06-02 20:20:22 +02:00
|
|
|
uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # 1.0.2 - Archived
|
2021-01-27 20:15:29 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ needs.setup.outputs.release_upload_url }}
|
2021-09-02 22:04:02 +02:00
|
|
|
asset_name: bw-snap-sha256-${{ env._PACKAGE_VERSION }}.txt
|
|
|
|
asset_path: ./dist/snap/bw-snap-sha256-${{ env._PACKAGE_VERSION }}.txt
|
2021-01-28 18:15:45 +01:00
|
|
|
asset_content_type: plain/text
|