Skip to content

Create Release

Create Release #16

name: Create Release
on:
workflow_dispatch:
push:
tags:
- "*"
jobs:
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Compile
run: dart compile exe bin/hds_desktop.dart -o hds_desktop_linux
- name: Archive artifact
uses: actions/upload-artifact@v3
with:
name: linux
path: hds_desktop_linux
build_macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Compile
run: dart compile exe bin/hds_desktop.dart -o hds_desktop_macos
# TODO: Make notarization work
- name: Import Code-Signing Certificates
uses: Apple-Actions/import-codesign-certs@v1
with:
# The certificates in a PKCS12 file encoded as a base64 string
p12-file-base64: ${{ secrets.DISTRIBUTION_CERTIFICATE_DATA }}
# The password used to import the PKCS12 file.
p12-password: ${{ secrets.DISTRIBUTION_CERTIFICATE_PASSPHRASE }}
- name: Install gon via Homebrew
run: brew install mitchellh/gon/gon
- name: Sign and notarize
env:
NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }}
run: gon macos/gon.json
- name: Archive artifact
uses: actions/upload-artifact@v3
with:
name: macos
path: build/hds_desktop_macos.zip
build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Compile
run: dart compile exe bin/hds_desktop.dart -o hds_desktop_windows.exe
- name: Archive artifact
uses: actions/upload-artifact@v3
with:
name: windows
path: hds_desktop_windows.exe
deploy:
runs-on: ubuntu-latest
needs: [build_linux, build_macos, build_windows]
if: success()
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Create release draft
uses: ncipollo/release-action@v1
with:
artifacts: "linux/*,macos/*,windows/*"
draft: true