Allow alpha builds

This commit is contained in:
Tommy Mikkelsen 2022-11-23 23:01:06 +01:00
parent 90b3d4032f
commit 17f831e8a2
2 changed files with 69 additions and 0 deletions

48
.github/workflows/alpha-build.yml vendored Normal file
View file

@ -0,0 +1,48 @@
name: Build/release
on:
push:
branches:
- alpha
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
# os: [macos-latest]
# os: [ubuntu-latest, windows-latest]
# os: [windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: 16.13
- name: Install dependencies
run: npm install
- name: see directory with dependencies
run: ls
- name: Add TMDB Secret
run: echo "${{ secrets.KEY_TMDB }}" > public/locales/.env.local
shell: bash
env:
KEY_TMDB: ${{ secrets.KEY_TMDB }}
- name: Add TVDB Secret
run: echo "${{ secrets.KEY_TVDB }}" >> public/locales/.env.local
shell: bash
env:
KEY_TVDB: ${{ secrets.KEY_TVDB }}
- name: Add POEditor Secret
run: echo "${{ secrets.KEY_POEDITOR }}" >> public/locales/.env.local
shell: bash
env:
KEY_POEDITOR: ${{ secrets.KEY_POEDITOR }}
- name: Deploy Releases
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run deploy

21
script/alpha.sh Normal file
View file

@ -0,0 +1,21 @@
# Release from alpha into a draft release
# Checkout Alpha Branch
git checkout alpha
# Get current version
CURVER=$(cat package.json|grep -oP '(?<="version": ")[^"]*')
echo $CURVER
# Get git root directory
root=$(git rev-parse --show-toplevel 2>&1)
# get commit hash for version file
rev=$(git rev-parse --short HEAD 2>&1)
echo Committing v$CURVER.$rev
# Commit to alpha Branch
git commit -am v$CURVER.$rev
# Tag alpha Branch
git tag v$CURVER.$rev
# Upload and trigger a release
git push && git push --tags
git checkout $CURBRANCH