Skip to content

Merge pull request #18 from studiorack/feature/clean-start #40

Merge pull request #18 from studiorack/feature/clean-start

Merge pull request #18 from studiorack/feature/clean-start #40

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
create_release:
name: Create release
runs-on: ubuntu-latest
outputs:
upload_id: ${{ steps.draft_release.outputs.id }}
upload_url: ${{ steps.draft_release.outputs.upload_url }}
steps:
- name: Draft release
id: draft_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
build_release:
name: Build release
needs: create_release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
file_name: studiorack-linux.AppImage
- os: macos-latest
file_name: studiorack-mac.dmg
- os: windows-latest
file_name: studiorack-win.exe
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup
shell: bash
run: |
npm ci
- name: Build
shell: bash
run: |
npm run dist
- name: Upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./dist/${{ matrix.file_name }}
asset_name: ${{ matrix.file_name }}
asset_content_type: application/octet-stream
publish_release:
name: Publish release
needs: [create_release, build_release]
runs-on: ubuntu-latest
steps:
- uses: eregon/publish-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.create_release.outputs.upload_id }}