SilverBullet pivot to become an offline-first PWA (#403)
This commit is contained in:
@@ -1,79 +0,0 @@
|
||||
name: Build & Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
jobs:
|
||||
build:
|
||||
name: Build (${{ matrix.os }} - ${{ matrix.arch }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: macOS-latest
|
||||
arch: arm64
|
||||
- os: macOS-latest
|
||||
arch: x64
|
||||
- os: windows-latest
|
||||
arch: x64
|
||||
- os: ubuntu-latest
|
||||
arch: x64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3.5.1
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: npm
|
||||
cache-dependency-path: desktop/package-lock.json
|
||||
- name: Setup Deno
|
||||
# uses: denoland/setup-deno@v1
|
||||
uses: denoland/setup-deno@d4873ceeec10de6275fecd1f94b6985369d40231
|
||||
with:
|
||||
deno-version: v1.32.5
|
||||
- name: Build SilverBullet
|
||||
run: deno task build
|
||||
- name: Create SilverBullet bundle
|
||||
run: deno task bundle
|
||||
- name: Set MacOS signing certs
|
||||
if: matrix.os == 'macOS-latest'
|
||||
run: chmod +x scripts/add-macos-cert.sh && ./scripts/add-macos-cert.sh
|
||||
env:
|
||||
MACOS_CERT_P12: ${{ secrets.MACOS_CERT_P12 }}
|
||||
MACOS_CERT_PASSWORD: ${{ secrets.MACOS_CERT_PASSWORD }}
|
||||
# - name: Set Windows signing certificate
|
||||
# if: matrix.os == 'windows-latest'
|
||||
# continue-on-error: true
|
||||
# id: write_file
|
||||
# uses: timheuer/base64-to-file@v1
|
||||
# with:
|
||||
# fileName: 'win-certificate.pfx'
|
||||
# encodedString: ${{ secrets.WINDOWS_CODESIGN_P12 }}
|
||||
- name: Install npm dependencies
|
||||
run: npm install
|
||||
working-directory: desktop
|
||||
- name: Build application
|
||||
run: npm run make -- --arch=${{ matrix.arch }}
|
||||
working-directory: desktop
|
||||
env:
|
||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
#WINDOWS_CODESIGN_FILE: ${{ steps.write_file.outputs.filePath }}
|
||||
#WINDOWS_CODESIGN_PASSWORD: ${{ secrets.WINDOWS_CODESIGN_PASSWORD }}
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
draft: true
|
||||
files: |
|
||||
desktop/out/**/*.deb
|
||||
desktop/out/**/*Setup.exe
|
||||
desktop/out/**/RELEASES
|
||||
desktop/out/**/*.nupkg
|
||||
desktop/out/**/*.rpm
|
||||
desktop/out/**/*.zip
|
||||
dist/silverbullet.js
|
||||
@@ -0,0 +1,89 @@
|
||||
name: Docker S3
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
tags:
|
||||
- "*"
|
||||
env:
|
||||
DENO_VERSION: v1.33
|
||||
# Docker & Registries
|
||||
ARCHITECTURES: linux/amd64,linux/arm64
|
||||
IMAGE_NAME: silverbullet-s3
|
||||
NAMESPACE_GITHUB: silverbulletmd
|
||||
NAMESPACE_DOCKER: zefhemel
|
||||
jobs:
|
||||
docker-build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Setup repo
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up QEMU for multi-arch builds with buildx
|
||||
uses: docker/setup-qemu-action@v2
|
||||
with:
|
||||
platforms: ${{ env.ARCHITECTURES }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
platforms: ${{ env.ARCHITECTURES }}
|
||||
|
||||
- name: Setup Deno
|
||||
uses: denoland/setup-deno@d4873ceeec10de6275fecd1f94b6985369d40231
|
||||
with:
|
||||
deno-version: ${{ env.DENO_VERSION }}
|
||||
|
||||
- name: Run bundle build
|
||||
run: |
|
||||
deno task build
|
||||
deno task bundle
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Log in to the ghcr Container registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
#
|
||||
# MetaData Extract Docu: <https://github.com/docker/metadata-action>
|
||||
#
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4.4.0
|
||||
with:
|
||||
images: |
|
||||
# Set the different image names(paces) for docker-hub & ghcr
|
||||
${{ env.NAMESPACE_DOCKER }}/${{ env.IMAGE_NAME }}
|
||||
ghcr.io/${{ env.NAMESPACE_GITHUB }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
# <https://github.com/docker/metadata-action#typeref>
|
||||
# minimal (short sha), enable f desired
|
||||
# type=sha,enable=true,priority=100,prefix=commit-,suffix=,format=short
|
||||
# set latest tag for default branch
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
#
|
||||
# tag w/ full tag part of git tag: <https://github.com/docker/metadata-action#typesemver>
|
||||
# only present for `on.push.tags` !
|
||||
type=semver,pattern={{raw}},enable=true
|
||||
# type=edge,branch=local # usually this would be the develop branch
|
||||
|
||||
- name: Build and push main docker images
|
||||
uses: docker/build-push-action@v4.0.0
|
||||
with:
|
||||
context: .
|
||||
platforms: ${{ env.ARCHITECTURES }}
|
||||
push: true
|
||||
file: Dockerfile.s3
|
||||
# Disable to get rid of unknown architecture in ghcr
|
||||
provenance: false
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
@@ -5,16 +5,16 @@ on:
|
||||
branches:
|
||||
- "main"
|
||||
tags:
|
||||
- "**"
|
||||
- "*"
|
||||
env:
|
||||
DENO_VERSION: v1.32.5
|
||||
DENO_VERSION: v1.33
|
||||
# Docker & Registries
|
||||
ARCHITECTURES: linux/amd64,linux/arm64
|
||||
IMAGE_NAME: silverbullet
|
||||
NAMESPACE_GITHUB: silverbulletmd
|
||||
NAMESPACE_DOCKER: zefhemel
|
||||
jobs:
|
||||
docker-build-push:
|
||||
docker-main:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -76,12 +76,13 @@ jobs:
|
||||
type=semver,pattern={{raw}},enable=true
|
||||
# type=edge,branch=develop # usually this would be the develop branch
|
||||
|
||||
- name: Build and push Docker images
|
||||
- name: Build and push main docker images
|
||||
uses: docker/build-push-action@v4.0.0
|
||||
with:
|
||||
context: .
|
||||
platforms: ${{ env.ARCHITECTURES }}
|
||||
push: true
|
||||
file: Dockerfile
|
||||
# Disable to get rid of unknown architecture in ghcr
|
||||
provenance: false
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Build & Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "*"
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup repo
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Deno
|
||||
uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: v1.33
|
||||
- name: Run build
|
||||
run: deno task build
|
||||
- name: Bundle
|
||||
run: deno task bundle
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
draft: true
|
||||
files: |
|
||||
website/CHANGELOG.md
|
||||
dist/silverbullet.js
|
||||
@@ -18,10 +18,9 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Deno
|
||||
# uses: denoland/setup-deno@v1
|
||||
uses: denoland/setup-deno@d4873ceeec10de6275fecd1f94b6985369d40231
|
||||
uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: v1.32.5
|
||||
deno-version: v1.33
|
||||
|
||||
- name: Run build
|
||||
run: deno task build
|
||||
@@ -30,4 +29,4 @@ jobs:
|
||||
run: deno task check
|
||||
|
||||
- name: Run tests
|
||||
run: deno task test
|
||||
run: deno task test --trace-ops
|
||||
|
||||
Reference in New Issue
Block a user