Skip to content

Version 1.1.0-beta

Version 1.1.0-beta #18

Workflow file for this run

name: Build
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v4
with:
node-version: 20
- name: yarn
run: yarn && yarn build
- name: build-mac
if: startsWith(matrix.os, 'macos-latest')
run: yarn production:mac
- name: Upload Mac artifact
if: startsWith(matrix.os, 'macos-latest')
uses: actions/upload-artifact@v4
with:
name: artifact-mac
path: |
./dist/electron-build/Mapcraft_mac.dmg
./dist/electron-build/Mapcraft_mac.dmg.blockmap
./dist/electron-build/Mapcraft_mac.7z
- name: build-linux
if: startsWith(matrix.os, 'ubuntu-latest')
run: yarn production:linux
- name: Upload Ubuntu artifact
if: startsWith(matrix.os, 'ubuntu-latest')
uses: actions/upload-artifact@v4
with:
name: artifact-linux
path: |
./dist/electron-build/Mapcraft_linux.AppImage
./dist/electron-build/Mapcraft_linux.7z
- name: build-windows
if: startsWith(matrix.os, 'windows-latest')
run: yarn production:windows
- name: Upload Windows artifact
if: startsWith(matrix.os, 'windows-latest')
uses: actions/upload-artifact@v4
with:
name: artifact-windows
path: |
./dist/electron-build/Mapcraft_win.exe
./dist/electron-build/Mapcraft_win.exe.blockmap
./dist/electron-build/Mapcraft_win.7z
publish:
needs: release
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./artifacts/artifact-mac/Mapcraft_mac.dmg
./artifacts/artifact-mac/Mapcraft_mac.dmg.blockmap
./artifacts/artifact-mac/Mapcraft_mac.7z
./artifacts/artifact-linux/Mapcraft_linux.AppImage
./artifacts/artifact-linux/Mapcraft_linux.7z
./artifacts/artifact-windows/Mapcraft_win.exe
./artifacts/artifact-windows/Mapcraft_win.exe.blockmap
./artifacts/artifact-windows/Mapcraft_win.7z