Skip to content
Snippets Groups Projects
Commit 3b496deb authored by Griefed's avatar Griefed :joystick:
Browse files

ci: Move gh-pages workflow into release workflow. Setup matrix for Electron...

ci: Move gh-pages workflow into release workflow. Setup matrix for Electron build and upload archives to release
parent 8896a2d5
No related branches found
No related tags found
1 merge request!14Develop
name: Deploy to GitHub pages
on:
push:
branches:
- master
workflow_dispatch:
jobs:
pages:
runs-on: ubuntu-latest
steps:
- name: Paused until further notice
run: |
echo "This action is paused until further notice."
echo "I need to figure out how to work with the assets folder for the tile images."
echo "Currently, they are in public/tiles, which ends in a 404 when running on GitHub pages."
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2.4.0
with:
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0
node-version: '>= 16.9.1'
# Set this option if you want the action to check for the latest available version that satisfies the version spec
check-latest: false
- run: npm install -g @quasar/cli
- run: npm install
- run: quasar build
- run: pwd && ls -al *
# DEPLOY TO GH-PAGES
- name: Deploy to GitHub-Pages
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages
folder: dist/spa
......@@ -8,6 +8,12 @@ on:
jobs:
release:
runs-on: ubuntu-latest
# OUTPUTS
outputs:
newtag: ${{ steps.tag.outputs.tag }}
uploadurl: ${{ steps.create_release.outputs.upload_url }}
steps:
# GET LATEST CODE
- name: Checkout latest code
......@@ -56,24 +62,25 @@ jobs:
- name: Install packages
run: npm install
- name: Build project
- name: Build project for NGINX release package
run: quasar build
- name: List files
run: pwd && ls -al *
- name: Create Build Archive tar.gz
# NGINX Archives
- name: Create NGINX Archive tar.gz
run: |
echo "**** Creating archive of quasar build ****"
tar -czf lttmm-${{ steps.tag.outputs.tag }}.tar.gz dist/spa
- name: Create Build Archive zip
tar -czf lttmm-NGINX-${{ steps.tag.outputs.tag }}.tar.gz dist/spa
- name: Create NGINX Archive zip
uses: papeloto/action-zip@v1
with:
files: dist/spa
recursive: true
dest: lttmm-${{ steps.tag.outputs.tag }}.zip
dest: lttmm-NGINX-${{ steps.tag.outputs.tag }}.zip
# Upload NGINX Assets
- name: Upload Release Archive tar.gz
id: upload-release-asset-archive-targz
uses: actions/upload-release-asset@v1
......@@ -81,10 +88,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./lttmm-${{ steps.tag.outputs.tag }}.tar.gz
asset_name: lttmm-${{ steps.tag.outputs.tag }}.tar.gz
asset_path: ./lttmm-NGINX-${{ steps.tag.outputs.tag }}.tar.gz
asset_name: lttmm-NGINX-${{ steps.tag.outputs.tag }}.tar.gz
asset_content_type: application/gzip
- name: Upload Release Archive zip
id: upload-release-asset-archive-zip
uses: actions/upload-release-asset@v1
......@@ -92,10 +98,17 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./lttmm-${{ steps.tag.outputs.tag }}.zip
asset_name: lttmm-${{ steps.tag.outputs.tag }}.zip
asset_path: ./lttmm-NGINX-${{ steps.tag.outputs.tag }}.zip
asset_name: lttmm-NGINX-${{ steps.tag.outputs.tag }}.zip
asset_content_type: application/zip
# DEPLOY TO GH-PAGES
- name: Deploy to GitHub-Pages
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages
folder: dist/spa
# DOCKER RELATED
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
......@@ -124,3 +137,75 @@ jobs:
ghcr.io/griefed/ltt-mapmaker:${{ steps.tag.outputs.tag }}
griefed/ltt-mapmaker:latest
griefed/ltt-mapmaker:${{ steps.tag.outputs.tag }}
electron:
needs: release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
# GET LATEST CODE
- name: Checkout latest code
uses: actions/checkout@master
with:
fetch-depth: 0
# SETUP NODE ENVIRONMENT
- name: Setup Node.js environment
uses: actions/setup-node@v2.4.0
with:
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0
node-version: '>= 16.9.1'
# Set this option if you want the action to check for the latest available version that satisfies the version spec
check-latest: false
- name: Build/release Electron app
uses: vedaprakashms/quasar_electron_build@V0.0.1
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}
- name: List files
run: ls dist/electron
- name: Rename folders
run: |
mv dist/electron/Let* dist/electron/lttmm-${{ matrix.os }}
# Electron Archives
- name: Create zip
uses: ihiroky/archive-action@v1
with:
root_dir: dist/electron/lttmm-${{ matrix.os }}
file_path: lttmm-app-${{ matrix.os }}-${{ needs.release.outputs.newtag }}.zip
- name: Create tar.gz
uses: ihiroky/archive-action@v1
with:
root_dir: dist/electron/lttmm-${{ matrix.os }}
file_path: lttmm-app-${{ matrix.os }}-${{ needs.release.outputs.newtag }}.tar.gz
# Upload App Assets
- name: Upload App Archive tar.gz
id: upload-release-asset-archive-targz
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.uploadurl }}
asset_path: ./lttmm-app-${{ matrix.os }}-${{ needs.release.outputs.newtag }}.tar.gz
asset_name: lttmm-app-${{ matrix.os }}-${{ needs.release.outputs.newtag }}.tar.gz
asset_content_type: application/gzip
- name: Upload App Archive zip
id: upload-release-asset-archive-zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.uploadurl }}
asset_path: ./lttmm-app-${{ matrix.os }}-${{ needs.release.outputs.newtag }}.zip
asset_name: lttmm-app-${{ matrix.os }}-${{ needs.release.outputs.newtag }}.zip
asset_content_type: application/zip
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment