mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
Removing branch constraints on when to expose build assets (#359)
* Removing branch constraints on when to expose build assets * updating to snap 5.0 * adding more snapcraft 5.0 specific updates * installing multipass * fixing syntax error * switching from using a VM via multipass to using lxd * trying the official snap build actions * fixing error * commenting out the snapcraft version * testing the new changes to the snapcraft.yml file * nameing the build snap task * naming the build snap task
This commit is contained in:
28
.github/workflows/build.yml
vendored
28
.github/workflows/build.yml
vendored
@@ -115,7 +115,6 @@ jobs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
- name: Create checksums
|
- name: Create checksums
|
||||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
|
||||||
run: |
|
run: |
|
||||||
checksum -f="./dist/bw-windows-${env:PACKAGE_VERSION}.zip" `
|
checksum -f="./dist/bw-windows-${env:PACKAGE_VERSION}.zip" `
|
||||||
-t sha256 | Out-File -Encoding ASCII ./dist/bw-windows-sha256-${env:PACKAGE_VERSION}.txt
|
-t sha256 | Out-File -Encoding ASCII ./dist/bw-windows-sha256-${env:PACKAGE_VERSION}.txt
|
||||||
@@ -125,49 +124,42 @@ jobs:
|
|||||||
-t sha256 | Out-File -Encoding ASCII ./dist/bw-linux-sha256-${env:PACKAGE_VERSION}.txt
|
-t sha256 | Out-File -Encoding ASCII ./dist/bw-linux-sha256-${env:PACKAGE_VERSION}.txt
|
||||||
|
|
||||||
- name: Upload windows zip asset
|
- name: Upload windows zip asset
|
||||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: bw-windows-${{ env.PACKAGE_VERSION }}.zip
|
name: bw-windows-${{ env.PACKAGE_VERSION }}.zip
|
||||||
path: ./dist/bw-windows-${{ env.PACKAGE_VERSION }}.zip
|
path: ./dist/bw-windows-${{ env.PACKAGE_VERSION }}.zip
|
||||||
|
|
||||||
- name: Upload windows checksum asset
|
- name: Upload windows checksum asset
|
||||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: bw-windows-sha256-${{ env.PACKAGE_VERSION }}.txt
|
name: bw-windows-sha256-${{ env.PACKAGE_VERSION }}.txt
|
||||||
path: ./dist/bw-windows-sha256-${{ env.PACKAGE_VERSION }}.txt
|
path: ./dist/bw-windows-sha256-${{ env.PACKAGE_VERSION }}.txt
|
||||||
|
|
||||||
- name: Upload macos zip asset
|
- name: Upload macos zip asset
|
||||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: bw-macos-${{ env.PACKAGE_VERSION }}.zip
|
name: bw-macos-${{ env.PACKAGE_VERSION }}.zip
|
||||||
path: ./dist/bw-macos-${{ env.PACKAGE_VERSION }}.zip
|
path: ./dist/bw-macos-${{ env.PACKAGE_VERSION }}.zip
|
||||||
|
|
||||||
- name: Upload macos checksum asset
|
- name: Upload macos checksum asset
|
||||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: bw-macos-sha256-${{ env.PACKAGE_VERSION }}.txt
|
name: bw-macos-sha256-${{ env.PACKAGE_VERSION }}.txt
|
||||||
path: ./dist/bw-macos-sha256-${{ env.PACKAGE_VERSION }}.txt
|
path: ./dist/bw-macos-sha256-${{ env.PACKAGE_VERSION }}.txt
|
||||||
|
|
||||||
- name: Upload linux zip asset
|
- name: Upload linux zip asset
|
||||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: bw-linux-${{ env.PACKAGE_VERSION }}.zip
|
name: bw-linux-${{ env.PACKAGE_VERSION }}.zip
|
||||||
path: ./dist/bw-linux-${{ env.PACKAGE_VERSION }}.zip
|
path: ./dist/bw-linux-${{ env.PACKAGE_VERSION }}.zip
|
||||||
|
|
||||||
- name: Upload linux checksum asset
|
- name: Upload linux checksum asset
|
||||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: bw-linux-sha256-${{ env.PACKAGE_VERSION }}.txt
|
name: bw-linux-sha256-${{ env.PACKAGE_VERSION }}.txt
|
||||||
path: ./dist/bw-linux-sha256-${{ env.PACKAGE_VERSION }}.txt
|
path: ./dist/bw-linux-sha256-${{ env.PACKAGE_VERSION }}.txt
|
||||||
|
|
||||||
- name: Upload Chocolatey asset
|
- name: Upload Chocolatey asset
|
||||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: bitwarden-cli.${{ env.PACKAGE_VERSION }}.nupkg
|
name: bitwarden-cli.${{ env.PACKAGE_VERSION }}.nupkg
|
||||||
@@ -178,7 +170,6 @@ jobs:
|
|||||||
name: Build Snap
|
name: Build Snap
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: cli
|
needs: cli
|
||||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@@ -189,13 +180,15 @@ jobs:
|
|||||||
$env:pkgVersion = (Get-Content -Raw -Path ./package.json | ConvertFrom-Json).version
|
$env:pkgVersion = (Get-Content -Raw -Path ./package.json | ConvertFrom-Json).version
|
||||||
echo "PACKAGE_VERSION=$env:pkgVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
echo "PACKAGE_VERSION=$env:pkgVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||||
|
|
||||||
- name: Install Snapcraft
|
#- name: Install Snapcraft
|
||||||
uses: samuelmeuli/action-snapcraft@v1
|
# uses: samuelmeuli/action-snapcraft@v1
|
||||||
|
# with:
|
||||||
|
# use_lxd: true
|
||||||
|
|
||||||
- name: Print environment
|
- name: Print environment
|
||||||
run: |
|
run: |
|
||||||
whoami
|
whoami
|
||||||
snapcraft --version
|
#snapcraft --version
|
||||||
echo "GitHub ref: $GITHUB_REF"
|
echo "GitHub ref: $GITHUB_REF"
|
||||||
echo "GitHub event: $GITHUB_EVENT"
|
echo "GitHub event: $GITHUB_EVENT"
|
||||||
echo "BW Package Version: $PACKAGE_VERSION"
|
echo "BW Package Version: $PACKAGE_VERSION"
|
||||||
@@ -216,8 +209,17 @@ jobs:
|
|||||||
|
|
||||||
cd dist/snap
|
cd dist/snap
|
||||||
ls -alth
|
ls -alth
|
||||||
snapcraft
|
|
||||||
|
|
||||||
|
- name: Build snap
|
||||||
|
uses: snapcore/action-build@6dd3202e55fccbcf8482a61f38fe630d655a2728 # v1.0.8
|
||||||
|
with:
|
||||||
|
path: dist/snap
|
||||||
|
|
||||||
|
- name: Create checksum
|
||||||
|
run: |
|
||||||
|
#sg lxd -c 'snapcraft --use-lxd'
|
||||||
|
cd dist/snap
|
||||||
|
ls -alth
|
||||||
sha256sum bw_${{ env.PACKAGE_VERSION }}_amd64.snap | awk '{split($0, a); print a[1]}' > bw-snap-sha256-${{ env.PACKAGE_VERSION }}.txt
|
sha256sum bw_${{ env.PACKAGE_VERSION }}_amd64.snap | awk '{split($0, a); print a[1]}' > bw-snap-sha256-${{ env.PACKAGE_VERSION }}.txt
|
||||||
|
|
||||||
- name: Install Snap
|
- name: Install Snap
|
||||||
|
|||||||
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
@@ -290,8 +290,17 @@ jobs:
|
|||||||
|
|
||||||
cd dist/snap
|
cd dist/snap
|
||||||
ls -alth
|
ls -alth
|
||||||
snapcraft
|
|
||||||
|
|
||||||
|
- name: Build snap
|
||||||
|
uses: snapcore/action-build@6dd3202e55fccbcf8482a61f38fe630d655a2728 # v1.0.8
|
||||||
|
with:
|
||||||
|
path: dist/snap
|
||||||
|
|
||||||
|
- name: Create checksum
|
||||||
|
run: |
|
||||||
|
#sg lxd -c 'snapcraft --use-lxd'
|
||||||
|
cd dist/snap
|
||||||
|
ls -alth
|
||||||
sha256sum bw_${{ env.PACKAGE_VERSION }}_amd64.snap | awk '{split($0, a); print a[1]}' > bw-snap-sha256-${{ env.PACKAGE_VERSION }}.txt
|
sha256sum bw_${{ env.PACKAGE_VERSION }}_amd64.snap | awk '{split($0, a); print a[1]}' > bw-snap-sha256-${{ env.PACKAGE_VERSION }}.txt
|
||||||
|
|
||||||
- name: Install Snap
|
- name: Install Snap
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ apps:
|
|||||||
parts:
|
parts:
|
||||||
bw:
|
bw:
|
||||||
plugin: dump
|
plugin: dump
|
||||||
source: bw-linux-$SNAPCRAFT_PROJECT_VERSION.zip
|
source: ./bw-linux-$SNAPCRAFT_PROJECT_VERSION.zip
|
||||||
prepare: |
|
override-build: |
|
||||||
chmod +x bw
|
chmod +x bw
|
||||||
|
snapcraftctl build
|
||||||
|
|||||||
Reference in New Issue
Block a user