Merge pull request #11 from joseph-flinn/adding-manual-publishing
Adding manual publishing
This commit is contained in:
commit
b906f9e231
|
@ -184,6 +184,17 @@ jobs:
|
||||||
Copy-Item "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.appx" `
|
Copy-Item "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.appx" `
|
||||||
-Destination "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx"
|
-Destination "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx"
|
||||||
|
|
||||||
|
- name: Deploy to Chocolatey
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
Copy-Item -Path ./stores/chocolatey -Destination ./dist/chocolatey -Recurse
|
||||||
|
Copy-Item -Path ./dist/nsis-web/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe -Destination ./dist/chocolatey
|
||||||
|
|
||||||
|
$checksum = checksum -t sha256 ./dist/chocoloatey/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe
|
||||||
|
$chocoInstall = "./dist/chocolatey/tools/chocolateyinstall.ps1"
|
||||||
|
(Get-Content $chocoInstall).replace('__version__', "$env:PACKAGE_VERSION").replace('__checksum__', $checksum) | Set-Content $chocoInstall
|
||||||
|
choco pack ./dist/chocolatey/bitwarden.nuspec --version "$env:PACKAGE_VERSION" --out ./dist/chocolatey
|
||||||
|
|
||||||
- name: Upload portable exe artifact
|
- name: Upload portable exe artifact
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
|
@ -212,6 +223,13 @@ jobs:
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx
|
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx
|
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx
|
||||||
|
|
||||||
|
- name: Upload nupkg artifact
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: bitwarden.${{ env.PACKAGE_VERSION }}.nupkg
|
||||||
|
path: ./dist/chocolatey/bitwarden.${{ env.PACKAGE_VERSION }}.nupkg
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -7,6 +7,7 @@ on:
|
||||||
description: 'Release Tag Name (vX.X.X)'
|
description: 'Release Tag Name (vX.X.X)'
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
cloc:
|
cloc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -23,8 +24,36 @@ jobs:
|
||||||
- name: Print lines of code
|
- name: Print lines of code
|
||||||
run: cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
|
run: cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
|
||||||
|
|
||||||
|
|
||||||
|
setup:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
release_upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Create Release Name
|
||||||
|
run: |
|
||||||
|
echo "RELEASE_NAME=${RELEASE_TAG_NAME:1}" >> $GITHUB_ENV
|
||||||
|
env:
|
||||||
|
RELEASE_TAG_NAME: ${{ github.event.inputs.release_tag_name }}
|
||||||
|
|
||||||
|
- name: Create Draft Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.event.inputs.release_tag_name }}
|
||||||
|
release_name: ${{ env.RELEASE_NAME }}
|
||||||
|
draft: true
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: setup
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
|
@ -66,38 +95,10 @@ jobs:
|
||||||
- name: Run linter
|
- name: Run linter
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|
||||||
- name: Build application
|
- name: Build & Publish
|
||||||
run: npm run dist:lin
|
run: npm run publish:lin
|
||||||
|
env:
|
||||||
- name: Upload .deb artifact
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-amd64.deb
|
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-amd64.deb
|
|
||||||
|
|
||||||
- name: Upload .rpm artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.rpm
|
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.rpm
|
|
||||||
|
|
||||||
- name: Upload .freebsd artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64.freebsd
|
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.freebsd
|
|
||||||
|
|
||||||
- name: Upload .snap artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap
|
|
||||||
path: ./dist/bitwarden_${{ env.PACKAGE_VERSION }}_amd64.snap
|
|
||||||
|
|
||||||
- name: Upload .AppImage artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.AppImage
|
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x86_64.AppImage
|
|
||||||
|
|
||||||
- name: Deploy to Snap Store
|
- name: Deploy to Snap Store
|
||||||
run: |
|
run: |
|
||||||
|
@ -105,8 +106,10 @@ jobs:
|
||||||
snapcraft logout
|
snapcraft logout
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
needs: setup
|
||||||
steps:
|
steps:
|
||||||
- name: Set up dotnet
|
- name: Set up dotnet
|
||||||
uses: actions/setup-dotnet@v1
|
uses: actions/setup-dotnet@v1
|
||||||
|
@ -188,54 +191,34 @@ jobs:
|
||||||
Copy-Item "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.appx" `
|
Copy-Item "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64.appx" `
|
||||||
-Destination "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx"
|
-Destination "./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx"
|
||||||
|
|
||||||
- name: Upload portable exe artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe
|
|
||||||
path: ./dist/Bitwarden-Portable-${{ env.PACKAGE_VERSION }}.exe
|
|
||||||
|
|
||||||
- name: Upload installer exe artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe
|
|
||||||
path: ./dist/nsis-web/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe
|
|
||||||
|
|
||||||
- name: Upload store appx ia32 artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx
|
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx
|
|
||||||
|
|
||||||
- name: Upload store appx x64 artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx
|
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx
|
|
||||||
|
|
||||||
- name: Deploy to Chocolatey
|
- name: Deploy to Chocolatey
|
||||||
run: ./scripts/choco-update.ps1 -version $env:PACKAGE_VERSION
|
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
- name: Upload Chocolatey nupkg artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: bitwarden.${{ env.PACKAGE_VERSION }}.nupkg
|
|
||||||
path: ./dist/chocolatey/bitwarden.${{ env.PACKAGE_VERSION }}.nupkg
|
|
||||||
|
|
||||||
- name: Upload release assets
|
|
||||||
run: |
|
run: |
|
||||||
hub release edit `
|
Copy-Item -Path ./stores/chocolatey -Destination ./dist/chocolatey -Recurse
|
||||||
-a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-ia32-store.appx `
|
Copy-Item -Path ./dist/nsis-web/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe -Destination ./dist/chocolatey
|
||||||
-a ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-x64-store.appx `
|
|
||||||
-m "$($env:RELEASE_TAG_NAME.TrimStart('v'))" `
|
$checksum = checksum -t sha256 ./dist/chocoloatey/Bitwarden-Installer-${{ env.PACKAGE_VERSION }}.exe
|
||||||
$env:RELEASE_TAG_NAME
|
$chocoInstall = "./dist/chocolatey/tools/chocolateyinstall.ps1"
|
||||||
shell: pwsh
|
(Get-Content $chocoInstall).replace('__version__', "$env:PACKAGE_VERSION").replace('__checksum__', $checksum) | Set-Content $chocoInstall
|
||||||
|
choco pack ./dist/chocolatey/bitwarden.nuspec --version "$env:PACKAGE_VERSION" --out ./dist/chocolatey
|
||||||
|
cd ./dist/chocolatey
|
||||||
|
choco push
|
||||||
|
|
||||||
|
- name: Upload Chocolatey nupkg release asset
|
||||||
|
id: upload-macos-checksum
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
RELEASE_TAG_NAME: ${{ github.event.inputs.release_tag_name }}
|
with:
|
||||||
|
upload_url: ${{ needs.setup.outputs.release_upload_url }}
|
||||||
|
asset_name: bitwarden.${{ env.PACKAGE_VERSION }}.nupkg
|
||||||
|
asset_path: ./dist/chocolatey/bitwarden.${{ env.PACKAGE_VERSION }}.nupkg
|
||||||
|
asset_content_type: application
|
||||||
|
|
||||||
|
|
||||||
macos:
|
macos:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
needs: setup
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
|
@ -318,18 +301,6 @@ jobs:
|
||||||
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
|
|
||||||
- name: Upload .zip artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip
|
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip
|
|
||||||
|
|
||||||
- name: Upload .dmg artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}.dmg
|
|
||||||
path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}.dmg
|
|
||||||
|
|
||||||
- name: Load Safari extension for App Store
|
- name: Load Safari extension for App Store
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: ./scripts/safari-build.ps1 -mas -copyonly
|
run: ./scripts/safari-build.ps1 -mas -copyonly
|
||||||
|
@ -340,25 +311,38 @@ jobs:
|
||||||
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
|
|
||||||
- name: Upload .pkg artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: Bitwarden-${{ env.PACKAGE_VERSION }}.pkg
|
|
||||||
path: ./dist/mas/Bitwarden-${{ env.PACKAGE_VERSION }}.pkg
|
|
||||||
|
|
||||||
- name: Deploy to App Store
|
- name: Deploy to App Store
|
||||||
run: npm run upload:mas
|
run: npm run upload:mas
|
||||||
env:
|
env:
|
||||||
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
|
||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
|
|
||||||
- name: Upload release assets
|
- name: Upload .pkg release asset
|
||||||
run: |
|
uses: actions/upload-release-asset@v1
|
||||||
hub release edit `
|
|
||||||
-a ./dist/mas/Bitwarden-${{ env.PACKAGE_VERSION }}.pkg `
|
|
||||||
-m "$($env:RELEASE_TAG_NAME.TrimStart('v'))" `
|
|
||||||
$env:RELEASE_TAG_NAME
|
|
||||||
shell: pwsh
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
RELEASE_TAG_NAME: ${{ github.event.inputs.release_tag_name }}
|
with:
|
||||||
|
upload_url: ${{ needs.setup.outputs.release_upload_url }}
|
||||||
|
asset_name: Bitwarden-${{ env.PACKAGE_VERSION }}.pkg
|
||||||
|
asset_path: ./dist/mas/Bitwarden-${{ env.PACKAGE_VERSION }}.pkg
|
||||||
|
asset_content_type: application/vnd.apple.installer+xml
|
||||||
|
|
||||||
|
- name: Upload zip release asset
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.setup.outputs.release_upload_url }}
|
||||||
|
asset_name: Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip
|
||||||
|
asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}-mac.zip
|
||||||
|
asset_content_type: application/zip
|
||||||
|
|
||||||
|
- name: Upload .dmg release asset
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.setup.outputs.release_upload_url }}
|
||||||
|
asset_name: Bitwarden-${{ env.PACKAGE_VERSION }}.dmg
|
||||||
|
asset_path: ./dist/Bitwarden-${{ env.PACKAGE_VERSION }}.dmg
|
||||||
|
asset_content_type: application/x-apple-diskimage
|
||||||
|
|
Loading…
Reference in New Issue