Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
(References: #42)
  • Loading branch information
Aszusz committed Mar 17, 2024
1 parent 5950955 commit 9694216
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,6 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: MoonshineSDKInstaller
name: msdki-macos
path: MoonshineSDKInstaller/build/bin/msdki.pkg
if-no-files-found: error
5 changes: 3 additions & 2 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,6 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: MoonshineSDKInstaller
path: MoonshineSDKInstaller/build/bin/msdki.exe
name: msdki-windows
path: MoonshineSDKInstaller/build/bin/msdki.exe
if-no-files-found: error
81 changes: 81 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: MANUAL - Release

on:
workflow_dispatch:
inputs:
env:
description: "An Environment"
required: true
type: choice
options:
- development
- production
version:
description: "A Version"
required: true
type: string

env:
tag: v${{ inputs.version }}${{ inputs.env == 'production' && ' ' || '-Dev' }}

jobs:

build-windows:
name: Build on Windows
uses: moonshine-ide/moonshine-sdk-installer/.github/workflows/build-windows.yml@42-github-actions-slow-refactor
secrets: inherit
with:
env: ${{ inputs.env }}
version: ${{ inputs.version }}

build-macos:
name: Build on MacOS
uses: moonshine-ide/moonshine-sdk-installer/.github/workflows/build-macos.yml@42-github-actions-slow-refactor
secrets: inherit
with:
env: ${{ inputs.env }}
version: ${{ inputs.version }}

release:
name: Draft Development Release
needs: [build-windows, build-macos]
runs-on: ubuntu-latest

steps:
- name: Print info
run: |
echo "Ref: ${{ github.ref_name }}"
echo "Env: ${{ inputs.env }}"
echo "Version: ${{ inputs.version }}"
echo "Tag: ${{ env.tag }}"
- name: Checkout repo
uses: actions/checkout@v4

- name: Download windows installer
uses: actions/download-artifact@v4
with:
name: masdki-windows

- name: Download macos installer
uses: actions/download-artifact@v4
with:
name: msdki-macos

- name: Debug artifacts
run: ls .

- name: Create release
uses: softprops/action-gh-release@v2
with:
name: v${{ inputs.version }} ${{ inputs.env }}
tag_name: ${{ env.tag }}
target_commitish: ${{ github.sha }}
body: |
This is a ${{ inputs.env }} release of MSDKI.
draft: true
prerelease: ${{ inputs.env == 'development' }}
files: |
msdki.exe
msdki.pkg
fail_on_unmatched_files: true

0 comments on commit 9694216

Please sign in to comment.