1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

changing out snap build script

This commit is contained in:
Joseph Flinn
2021-01-08 23:28:32 +00:00
parent 7669b654ce
commit 20dcfe8ad3

View File

@@ -96,15 +96,12 @@ jobs:
- name: Package Chocolatey - name: Package Chocolatey
shell: pwsh shell: pwsh
run: | run: |
#.\scripts\choco-pack.ps1 # DO NOT USE PUSH SWITCH!
Copy-Item -Path stores\chocolatey -Destination dist\chocolatey -Recurse Copy-Item -Path stores\chocolatey -Destination dist\chocolatey -Recurse
Copy-Item dist\windows\bw.exe -Destination dist\chocolatey\tools Copy-Item dist\windows\bw.exe -Destination dist\chocolatey\tools
Copy-Item LICENSE.txt -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 choco pack dist\chocolatey\bitwarden-cli.nuspec --version ${{ env.PACKAGE_VERSION }} --out dist\chocolatey
Get-ChildItem
- name: Zip - name: Zip
shell: cmd shell: cmd
run: | run: |
@@ -221,15 +218,20 @@ jobs:
name: Publish Snap name: Publish Snap
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
if: github.event_name == 'release' #if: github.event_name == 'release'
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Set PACKAGE_VERSION
run: |
$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 - name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v1 uses: samuelmeuli/action-snapcraft@v1
with: #with:
snapcraft_token: ${{ secrets.SNAP_TOKEN }} # snapcraft_token: ${{ secrets.SNAP_TOKEN }}
- name: Print environment - name: Print environment
run: | run: |
@@ -244,7 +246,16 @@ jobs:
- name: Install Snap - name: Install Snap
shell: pwsh shell: pwsh
run: | run: |
./scripts/snap-build.ps1 -version $env:PACKAGE_VERSION #./scripts/snap-build.ps1 -version $env:PACKAGE_VERSION
Copy-Item -Path stores\snap -Destination dist\snap
(Get-Content snap\snapcraft.yaml).replace('__version__', ${{ env.PACKAGE_VERSION }}) | Set-Content snap\snapcraft.yaml
cd dist\snap
Get-ChildItem
snapcraft
cd ..\..
Get-ChildItem
snap install ./dist/snap/bw*.snap --dangerous snap install ./dist/snap/bw*.snap --dangerous
- name: Test Snap - name: Test Snap
@@ -261,11 +272,11 @@ jobs:
snap remove bw snap remove bw
./scripts/snap-update.ps1 ./scripts/snap-update.ps1
- name: Publish - name: Publish linux checksum to GitHub
shell: pwsh uses: actions/upload-artifact@v2
run: | with:
echo "<stub for publishing snap to github release>" name: bw_${{ env.PACKAGE_VERSION }}_amd64.snap
echo "./dist/snap/bw_${PACKAGE_VERSION}_amd64.snap" path: ./dist/snap/bw_${{ env.PACKAGE_VERSION }}_amd64.snap
- name: Snap Logout - name: Snap Logout
run: snapcraft logout run: snapcraft logout