Skip to content

nightly-builds.yml #436

nightly-builds.yml

nightly-builds.yml #436

name: nightly-builds.yml
on:
schedule:
- cron: "0 17 * * *"
workflow_dispatch:
jobs:
nightly-builds:
runs-on: ubuntu-latest
env:
zip-name: archiverappliance-datasource
strategy:
matrix:
node: [16]
continue-on-error: [false]
continue-on-error: ${{ matrix.continue-on-error }}
steps:
- name: Checkout Github repository
uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Move nightly tag
uses: EndBug/latest-tag@latest
with:
ref: nightly
description: "For nightly build"
force-branch: false
- name: Setup NodeJS environment
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Setup Go environment
uses: actions/setup-go@v2
- name: Run Go tests using Mage
uses: magefile/mage-action@v1
with:
version: latest
args: vtest
- name: Build backend
uses: magefile/mage-action@v1
with:
version: latest
args: -v buildAll
- name: Install frontend tools
run: |
npm install -g yarn
yarn install
- name: List all Yarn packages
run: |
yarn list
- name: Build frontend
run: |
yarn build
- name: Prepare Release
env:
ZIP_NAME: ${{ env.zip-name }}
run: |
REPO_DIRECTORY=${PWD##*/}
ls
pushd ../
zip -r $REPO_DIRECTORY/$ZIP_NAME.zip $REPO_DIRECTORY -x @$REPO_DIRECTORY/exclude.txt
popd
- name: Upload nightly builds
uses: softprops/action-gh-release@v1
with:
tag_name: "nightly"
files: ${{ env.zip-name }}.zip