Skip to content

Build/release Beta #273

Build/release Beta

Build/release Beta #273

Workflow file for this run

name: Build/release Beta
on:
pull_request:
workflow_dispatch:
schedule:
- cron: 0 0 * * 5
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
#os: [ubuntu-latest,windows-2022]
os: [ubuntu-latest,windows-latest]
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: 16.x
- name: Minecraft Custom Tag
id: mctagcustom
uses: boyphongsakorn/minecraft-beta-version-style@v1.16
#- run: npm view saox version >> ${{ env.betalevel }}
#- run: npm version ${{ env.betalevel }}-beta
- name: Extract version
id: extract_version
uses: Saionaro/extract-package-version@v1.0.6
#- name: Print version
# run: echo ${{ steps.extract_version.outputs.version }}
#- run: git config --global user.email "boy1556@hotmail.com"
#- run: git config --global user.name "Your Name"
#- run: npm version ${{ steps.extract_version.outputs.version }}-beta
#- run: npm view saox version
- run: node prere.js
- name: Bump version and push tag
id: tag_version
if: matrix.os == 'windows-latest'
uses: mathieudutour/github-tag-action@v5.6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: ''
custom_tag: ${{ steps.extract_version.outputs.version }}-beta-${{ steps.mctagcustom.outputs.betaversion }}
- run: npm config set tag-version-prefix ''
- run: npm version ${{ steps.extract_version.outputs.version }}-beta-${{ steps.mctagcustom.outputs.betaversion }} --no-git-tag-version
- run: sudo dpkg --add-architecture i386
if: matrix.os == 'ubuntu-latest'
#- run: wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
# if: matrix.os == 'ubuntu-latest'
- run: sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport
if: matrix.os == 'ubuntu-latest'
#- run: sudo apt-add-repository "deb https://dl.winehq.org/wine-builds/ubuntu $(lsb_release -cs) main"
# if: matrix.os == 'ubuntu-latest'
#- run: wget -nc https://dl.winehq.org/wine-builds/winehq.key && sudo apt-key add winehq.key && sudo apt update
# if: matrix.os == 'ubuntu-latest'
#- run: wget -nc https://dl.winehq.org/wine-builds/Release.key
# if: matrix.os == 'ubuntu-latest'
#- run: sudo apt-key add Release.key
# if: matrix.os == 'ubuntu-latest'
#- run: sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
# if: matrix.os == 'ubuntu-latest'
#- run: sudo apt-get update
# if: matrix.os == 'ubuntu-latest'
#- run: sudo apt install --install-recommends winehq-stable
# if: matrix.os == 'ubuntu-latest'
- run: wget -O - https://gist.githubusercontent.com/datawookie/0e0e9cfebef214502bf19d36a6ba21bb/raw/208fe5a7ed24d526ff9746f10c6ecd435dc07e83/install-wine.sh | bash
if: matrix.os == 'ubuntu-latest'
- name: install dependencies
run: npm install --legacy-peer-deps
#- run: npm update
# if: matrix.os == 'windows-latest'
- run: npm i electron-builder@22.9.1 --legacy-peer-deps
if: matrix.os == 'windows-latest'
- name: build
run: npm run make
if: matrix.os == 'ubuntu-latest'
env:
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: build
run: npm run winmake
if: matrix.os == 'windows-latest'
env:
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#- name: Build/release Electron app
# uses: tchurch1993/action-electron-builder@v1.1
# env:
# GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
# with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
#github_token: ${{ secrets.github_token }}
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
#release: ${{ startsWith(github.ref, 'refs/tags/') }}
#skip_build: true
#args: '--publish always'