Skip to content

Commit

Permalink
init repo
Browse files Browse the repository at this point in the history
  • Loading branch information
walmat committed Nov 9, 2022
0 parents commit 162dbf7
Show file tree
Hide file tree
Showing 934 changed files with 196,720 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This file specifies files that are *not* uploaded to Google Cloud Platform
# using gcloud. It follows the same syntax as .gitignore, with the addition of
# "#!include" directives (which insert the entries of the given .gitignore-style
# file at that point).
#
# For more information, run:
# $ gcloud topic gcloudignore
#
.gcloudignore
# If you would like to upload your .git directory, .gitignore file or files
# from your .gitignore file, remove the corresponding line
# below:
.git
.gitignore

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
# Test binary, build with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Client stuff
web/
dist/
docs/
scripts/
cmd/*
!cmd/api
*.md

# IDE stuff
.idea/
.vscode/

# Local env
.env
121 changes: 121 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
on:
workflow_dispatch:
push:
branches:
- main
name: Build
jobs:
build-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Check Node Cache"
uses: actions/cache@v2
id: yarn-cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- uses: borales/[email protected]
if: steps.yarn-cache.outputs.cache-hit != 'true'
with:
cmd: --cwd web install # will run `yarn install` command
- uses: borales/[email protected]
with:
cmd: --cwd web build # will run `yarn build` command
- name: "Upload Artifact"
uses: actions/upload-artifact@v2
with:
name: frontend
path: cmd/bot/app/web/
retention-days: 1

build-and-deploy:
needs: build-frontend
strategy:
matrix:
os: [macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
BUCKET_NAME: carina-autoupdater-1
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/download-artifact@v2
with:
name: frontend
path: cmd/bot/app/web/
- name: Build
run: go run ./scripts/build-scripts/main.go
- name: Import Code-Signing Certificates (MacOS)
if: matrix.os == 'macos-latest'
uses: Apple-Actions/import-codesign-certs@v1
with:
# The certificates in a PKCS12 file encoded as a base64 string
p12-file-base64: ${{ secrets.AC_P12_BASE64 }}
# The password used to import the PKCS12 file.
p12-password: ${{ secrets.AC_P12_BASE64_PASSWORD }}
- name: Install gon via HomeBrew (MacOS)
if: matrix.os == 'macos-latest'
run: |
brew tap mitchellh/gon
brew install mitchellh/gon/gon
- name: Sign Binaries w/ Gon (MacOS)
if: matrix.os == 'macos-latest'
env:
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
run: |
gon -log-level=debug -log-json ./scripts/build-scripts/gon.json
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@master
with:
project_id: nebulabots
service_account_key: ${{ secrets.GCP_CREDENTIALS }}
export_default_credentials: true
- name: Delete files from bucket(MacOS)
if: |
matrix.os == 'macos-latest' && steps.extract_branch.outputs.branch == 'main'
run: gsutil rm -f gs://${{ env.BUCKET_NAME }}/*.dmg
- name: Delete files from bucket(Windows)
if: |
matrix.os == 'windows-latest' && steps.extract_branch.outputs.branch == 'main'
run: |
gsutil rm -f gs://${{ env.BUCKET_NAME }}/*.exe
gsutil rm -f gs://${{ env.BUCKET_NAME }}/*.bak
- name: Upload Release
if: steps.extract_branch.outputs.branch == 'main'
uses: google-github-actions/upload-cloud-storage@main
with:
credentials: ${{ secrets.GCP_CREDENTIALS }}
path: dist/
destination: ${{ env.BUCKET_NAME }}
parent: false
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: dist-${{ matrix.os }}
path: dist/
retention-days: 1
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Ignore react app build output
cmd/bot/app/web/*
!cmd/bot/ui/app/web/.gitkeep

#Production build artifacts
dist/
cmd/bot/*.syso

# React dependencies
node_modules
coverage
build

.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Relay
__generated__/

# debug
cmd/api/__debug_bin
cmd/watcher/__debug_bin

# IDE artifacts
.idea/dataSources*
.idea/dataSources/

# gcloud
cloud_sql_proxy
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/nebula.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/runConfigurations/Build_Frontend.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/runConfigurations/Run_API_Watcher.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/runConfigurations/Run_API__Debug_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/runConfigurations/Run_Bot_Watcher.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .idea/runConfigurations/Run_Bot__Production_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/runConfigurations/Run_Debug.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations/Run_Tests.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/runConfigurations/Serve_Frontend.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/sqldialects.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 162dbf7

Please sign in to comment.