Skip to content

Nightly develop Binaries #622

Nightly develop Binaries

Nightly develop Binaries #622

name: Nightly develop Binaries
on:
schedule:
- cron: '20 3 * * *'
workflow_dispatch:
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Download a file
run: curl "https://raw.githubusercontent.com/${{ github.repository }}/develop/package.json" -o package.json
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
- name: Get version
id: vars
run: echo "::set-output name=tag::$(node -p "require('./package.json').version")"
- name: Create nightly release
id: create_release
uses: viperproject/create-nightly-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.vars.outputs.tag }}-${{ steps.date.outputs.date }}
release_name: Superalgos-Beta-v${{ steps.vars.outputs.tag }} Snapshot ${{ steps.date.outputs.date }}
keep_num: 5
keep_tags: false
build-release:
runs-on: ${{ matrix.os }}
needs: create-release
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
- name: Check out Git repository
uses: actions/checkout@v2
with:
ref: develop
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 14
- name: Get version
id: vars
run: echo "::set-output name=tag::$(node -p "require('./package.json').version")"
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}
args: "-c.extraMetadata.version=${{ steps.vars.outputs.tag }}-${{ steps.date.outputs.date }} -c build/electron-builder.json -p onTagOrDraft"
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
# release: ${{ startsWith(github.ref, 'refs/tags/v') }}
release: true