Skip to content

0.2.13

0.2.13 #7

Workflow file for this run

name: Build and Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [win, linux, mac]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Build for ${{ matrix.platform }}
run: npm run package-${{ matrix.platform }}
- name: Archive build artifacts
if: startsWith(matrix.platform, 'win32')
run: zip -r dist/Topaz-win.zip dist/Topaz-win32-x64/
- name: Archive build artifacts
if: startsWith(matrix.platform, 'linux')
run: zip -r dist/Topaz-linux.zip dist/Topaz-linux-x64/
- name: Archive build artifacts
if: startsWith(matrix.platform, 'darwin')
run: zip -r dist/Topaz-mac.zip dist/Topaz-darwin-x64/
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.platform }}-build
path: |
dist/Topaz-win.zip
dist/Topaz-linux.zip
dist/Topaz-mac.zip
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset (Windows)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/Topaz-win.zip
asset_name: Topaz-win.zip
asset_content_type: application/zip
- name: Upload Release Asset (Linux)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/Topaz-linux.zip
asset_name: Topaz-linux.zip
asset_content_type: application/zip
- name: Upload Release Asset (Mac)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/Topaz-mac.zip
asset_name: Topaz-mac.zip
asset_content_type: application/zip