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:
Joseph Flinn 2021-08-11 15:38:05 -07:00 committed by GitHub
parent 380d4ea28e
commit 45eaa24b0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 16 deletions

View File

@ -115,7 +115,6 @@ jobs:
}
- name: Create checksums
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
run: |
checksum -f="./dist/bw-windows-${env:PACKAGE_VERSION}.zip" `
-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
- name: Upload windows zip asset
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
uses: actions/upload-artifact@v2
with:
name: bw-windows-${{ env.PACKAGE_VERSION }}.zip
path: ./dist/bw-windows-${{ env.PACKAGE_VERSION }}.zip
- name: Upload windows checksum asset
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
uses: actions/upload-artifact@v2
with:
name: bw-windows-sha256-${{ env.PACKAGE_VERSION }}.txt
path: ./dist/bw-windows-sha256-${{ env.PACKAGE_VERSION }}.txt
- name: Upload macos zip asset
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
uses: actions/upload-artifact@v2
with:
name: bw-macos-${{ env.PACKAGE_VERSION }}.zip
path: ./dist/bw-macos-${{ env.PACKAGE_VERSION }}.zip
- name: Upload macos checksum asset
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
uses: actions/upload-artifact@v2
with:
name: bw-macos-sha256-${{ env.PACKAGE_VERSION }}.txt
path: ./dist/bw-macos-sha256-${{ env.PACKAGE_VERSION }}.txt
- name: Upload linux zip asset
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
uses: actions/upload-artifact@v2
with:
name: bw-linux-${{ env.PACKAGE_VERSION }}.zip
path: ./dist/bw-linux-${{ env.PACKAGE_VERSION }}.zip
- name: Upload linux checksum asset
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
uses: actions/upload-artifact@v2
with:
name: bw-linux-sha256-${{ env.PACKAGE_VERSION }}.txt
path: ./dist/bw-linux-sha256-${{ env.PACKAGE_VERSION }}.txt
- name: Upload Chocolatey asset
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
uses: actions/upload-artifact@v2
with:
name: bitwarden-cli.${{ env.PACKAGE_VERSION }}.nupkg
@ -178,7 +170,6 @@ jobs:
name: Build Snap
runs-on: ubuntu-latest
needs: cli
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/rc'
steps:
- name: Checkout repo
uses: actions/checkout@v2
@ -189,13 +180,15 @@ jobs:
$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
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v1
#- name: Install Snapcraft
# uses: samuelmeuli/action-snapcraft@v1
# with:
# use_lxd: true
- name: Print environment
run: |
whoami
snapcraft --version
#snapcraft --version
echo "GitHub ref: $GITHUB_REF"
echo "GitHub event: $GITHUB_EVENT"
echo "BW Package Version: $PACKAGE_VERSION"
@ -216,8 +209,17 @@ jobs:
cd dist/snap
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
- name: Install Snap

View File

@ -290,8 +290,17 @@ jobs:
cd dist/snap
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
- name: Install Snap

View File

@ -11,6 +11,7 @@ apps:
parts:
bw:
plugin: dump
source: bw-linux-$SNAPCRAFT_PROJECT_VERSION.zip
prepare: |
source: ./bw-linux-$SNAPCRAFT_PROJECT_VERSION.zip
override-build: |
chmod +x bw
snapcraftctl build