Update #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 npm | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: npm | |
run: npm install && npm run build | |
- name: build-mac | |
if: startsWith(matrix.os, 'macos-latest') | |
run: npm run 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: npm run 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: npm run 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 |