Skip to content

Prompt a proper error messaage if ROM name is empty #14

Prompt a proper error messaage if ROM name is empty

Prompt a proper error messaage if ROM name is empty #14

Workflow file for this run

name: Build release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' # Push events to any matching semantic tag. For example, v1.10.1 or v2.0.0 or v3.0.0-alpha.
# For more details, see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node-version: [19.x]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm install
- name: Set package version
run: npm version --no-git-tag-version ${{ github.ref_name }}
- name: Build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build
- name: Upload artifacts Mac
if: startsWith(matrix.os, 'macos')
uses: actions/upload-artifact@v4
with:
name: croco-cartridge-app-macos
path: |
dist/*.dmg
- name: Upload artifacts Windows
if: startsWith(matrix.os, 'windows')
uses: actions/upload-artifact@v4
with:
name: croco-cartridge-app-windows
path: |
dist/*.exe
- name: Upload artifacts Linux
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v4
with:
name: croco-cartridge-app-linux
path: |
dist/*.AppImage
- name: Upload artifacts Web
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v4
with:
name: croco-cartridge-webapp
path: |
build
- name: Upload artifact
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-pages-artifact@v2
with:
path: ./build
# Deployment job for GH pages
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
create_release:
name: Create release
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
merge-multiple: false
- name: list files
run: ls -R
- name: Package webapp
run: |
tar cvzf croco-cartridge-webapp-${{ github.ref_name }}.tgz croco-cartridge-webapp/*
- name: list files 2
run: ls -R
- name: Release
if: startsWith(github.ref, 'refs/tags/')
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prerelease: false
draft: true
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
files: |
**/*.AppImage
**/*.exe
**/*.dmg
*.tgz