nightly-builds.yml #355
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |