removed origin workflows and new Docker build

This commit is contained in:
Carsten Meyer 2021-03-21 15:56:46 +01:00
parent 8dc6cbcaf1
commit 6720298e77
9 changed files with 27 additions and 426 deletions

View file

@ -1,53 +0,0 @@
name: Win Store File on Release
on:
release:
types: [published]
workflow_dispatch:
inputs: null
jobs:
windows-store-artifact:
runs-on: windows-latest
if: "!github.event.release.prerelease"
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Load Electron Builder Windows Store Config
run: echo $WIN_STORE_ELECTRON_BUILDER_YML | base64 --decode > electron-builder.yaml
shell: bash
env:
WIN_STORE_ELECTRON_BUILDER_YML: ${{secrets.WIN_STORE_ELECTRON_BUILDER_YML}}
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modulesTWO-${{ hashFiles('**/yarn.lock') }}
- name: Install Yarn Packages
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Lint
run: yarn lint
- name: Test Unit
run: yarn test
- name: Build Frontend & Electron
run: yarn build
- name: Build/Release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
build_script_name: empty
release: false
github_token: ${{ secrets.github_token }}
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
with:
name: WinStoreRelease
path: app-builds/*.appx

View file

@ -1,29 +0,0 @@
name: AUR Release on Release
on:
release:
types: [published]
workflow_dispatch:
inputs: null
jobs:
aur-release:
runs-on: ubuntu-latest
if: "!github.event.release.prerelease"
steps:
- uses: actions/checkout@v2
- run: PACKAGE_VERSION=$(cat ./package.json | grep version | head -1 | sed 's/[^0-9.]*//g') && echo "package_version=$PACKAGE_VERSION" >> $GITHUB_ENV
- run: sed "s/PACKAGE_VERSION/${package_version}/g" build/linux/PKGBUILD_template > build/linux/PKGBUILD
- name: Publish AUR package
uses: KSXGitHub/github-actions-deploy-aur@v2.2.3
with:
pkgname: superproductivity-bin
pkgbuild: build/linux/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Update AUR package
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519

View file

@ -0,0 +1,18 @@
name: Publish Docker image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: meyca/super-productivity
tag_with_ref: true

View file

@ -1,62 +0,0 @@
name: Mac Store Release on Release
on:
release:
types: [ published ]
workflow_dispatch:
inputs: null
jobs:
mac-store-release:
runs-on: macos-latest
if: "!github.event.release.prerelease"
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modulesTWO-${{ hashFiles('**/yarn.lock') }}
- name: Install Yarn Packages
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
- run: 'echo "$PROVISION_PROFILE" | base64 --decode > embedded.provisionprofile'
shell: bash
env:
PROVISION_PROFILE: ${{secrets.mas_provision_profile}}
- name: Lint
run: yarn lint
- name: Test Unit
run: yarn test
# - name: Test E2E
# run: yarn e2e
- name: Build Frontend & Electron
run: yarn build
- uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.mac_certs }}
p12-password: ${{ secrets.mac_certs_password }}
- name: Build Electron app
run: yarn dist:mac:mas:buildOnly
- name: Validate App
run: ls app-builds; ls app-builds/mas; xcrun altool --validate-app -f app-builds/mas/Super*.pkg -u ${{secrets.APPLEID}} -p ${{secrets.APPLEIDPASS}}
env:
APPLEID: ${{secrets.APPLEID}}
APPLEIDPASS: ${{secrets.APPLEIDPASS}}
- name: Push to Store
run: xcrun altool --upload-app -f app-builds/mas/Super*.pkg -u ${{secrets.APPLEID}} -p ${{secrets.APPLEIDPASS}}
env:
APPLEID: ${{secrets.APPLEID}}
APPLEIDPASS: ${{secrets.APPLEIDPASS}}

View file

@ -1,52 +0,0 @@
name: Win Store File on Release
on:
release:
types: [published]
workflow_dispatch:
inputs: null
jobs:
snap-release:
runs-on: ubuntu-latest
if: "!github.event.release.prerelease"
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modulesTWO-${{ hashFiles('**/yarn.lock') }}
- name: Install Yarn Packages
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Lint
run: yarn lint
- name: Test Unit
run: yarn test
- name: Test E2E
run: yarn e2e
- name: Build Frontend & Electron
run: yarn build
- name: Build/Release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
build_script_name: empty
github_token: ${{ secrets.github_token }}
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v1
with:
# Log in to Snap Store
snapcraft_token: ${{ secrets.snapcraft_token }}
- run: snapcraft push app-builds/superProductivity*.snap --release stable

View file

@ -1,53 +0,0 @@
name: Web App on Release
on:
release:
types: [published]
workflow_dispatch:
inputs: null
jobs:
upload-to-app-super-productivity:
runs-on: ubuntu-latest
if: "!github.event.release.prerelease"
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modulesTWO-${{ hashFiles('**/yarn.lock') }}
- name: Install Yarn Packages
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Lint
run: yarn lint
- name: Test Unit
run: yarn test
- name: Test E2E
run: yarn e2e
- name: Build Frontend & Electron
run: yarn buildFrontend:prodWeb
- name: Deploy to Web Server
uses: easingthemes/ssh-deploy@v2.1.5
env:
SSH_PRIVATE_KEY: ${{ secrets.WEB_SERVER_SSH_KEY }}
ARGS: '-rltgoDzvO --delete --exclude "news.json"'
SOURCE: "dist/"
REMOTE_HOST: ${{ secrets.WEB_REMOTE_HOST }}
REMOTE_USER: ${{ secrets.WEB_REMOTE_USER }}
TARGET: ${{ secrets.WEB_REMOTE_TARGET }}

View file

@ -1,147 +0,0 @@
name: Build All & Release
on:
push:
branches: [ master, test/git-actions ]
tags:
- v*
jobs:
linux-bin-and-snap-release:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modulesTWO-${{ hashFiles('**/yarn.lock') }}
- name: Install Yarn Packages
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Lint
run: yarn lint
- name: Test Unit
run: yarn test
- name: Test E2E
run: yarn e2e
- name: Build Frontend & Electron
run: yarn build
- name: Build/Release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
build_script_name: empty
github_token: ${{ secrets.github_token }}
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v1
with:
# Log in to Snap Store
snapcraft_token: ${{ secrets.snapcraft_token }}
# Release to edge if no tag and to candidate if tag
- run: snapcraft push app-builds/superProductivity*.snap --release edge
if: false == startsWith(github.ref, 'refs/tags/v')
- run: snapcraft push app-builds/superProductivity*.snap --release candidate
if: startsWith(github.ref, 'refs/tags/v')
mac-bin:
runs-on: macos-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Echo is Release
run: echo "IS_RELEASE $IS_RELEASE, ${{ startsWith(github.ref, 'refs/tags/v') }}"
env:
IS_RELEASE: ${{ startsWith(github.ref, 'refs/tags/v') }}
- name: Check out Git repository
uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modulesTWO-${{ hashFiles('**/yarn.lock') }}
- name: Install Yarn Packages
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
- run: 'echo "$PROVISION_PROFILE" | base64 --decode > embedded.provisionprofile'
shell: bash
env:
PROVISION_PROFILE: ${{secrets.dl_provision_profile}}
- name: Prepare for app notarization
# Import Apple API key for app notarization on macOS
run: |
mkdir -p ~/private_keys/
echo '${{ secrets.mac_api_key }}' > ~/private_keys/AuthKey_${{ secrets.mac_api_key_id }}.p8
- name: Lint
run: yarn lint
- name: Test Unit
run: yarn test
- name: Test E2E
run: yarn e2e
- name: Build Frontend & Electron
run: yarn build
- name: Build/Release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
build_script_name: empty
github_token: ${{ secrets.github_token }}
mac_certs: ${{ secrets.mac_certs }}
mac_certs_password: ${{ secrets.mac_certs_password }}
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
env:
# macOS notarization API key
API_KEY_ID: ${{ secrets.mac_api_key_id }}
API_KEY_ISSUER_ID: ${{ secrets.mac_api_key_issuer_id }}
windows-bin:
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modulesTWO-${{ hashFiles('**/yarn.lock') }}
- name: Install Yarn Packages
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
- name: Lint
run: yarn lint
- name: Test Unit
run: yarn test
- name: Build Frontend & Electron
run: yarn build
- name: Build/Release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
build_script_name: empty
github_token: ${{ secrets.github_token }}
release: ${{ startsWith(github.ref, 'refs/tags/v') }}

View file

@ -1,16 +0,0 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
days-before-stale: 120
days-before-close: 14
stale-issue-message: 'This issue has not received any updates in 90 days. Please comment, if this still relevant!'
stale-pr-message: 'This PR has not received any updates in 90 days. Please comment, if this still relevant!'
days-before-pr-close: -1

View file

@ -3,40 +3,35 @@
### build ###
# base image
FROM node:12.2.0 as build
FROM node:12 as build
# install chrome for protractor tests
#RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
#RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
#RUN apt-get update && apt-get install -yq google-chrome-stable
# add app
COPY . /app
# set working directory
WORKDIR /app
# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH
# install and cache app dependencies
COPY package.json /app/package.json
COPY ./tools /app/tools
RUN yarn
RUN yarn global add @angular/cli@8.0.2
RUN yarn global add @angular/cli
# add app
COPY . /app
# run tests
#RUN ng test --watch=false
#RUN ng e2e --port 4202
# run linter
RUN yarn lint
# generate build
RUN ng build --output-path=dist
RUN yarn buildFrontend:prodWeb
### serve ###
# base image
FROM nginx:1.16.0-alpine
FROM nginx:1-alpine
# environmental variables
ENV PORT=80