Skip to content

Version v0.17.2 release #12

Version v0.17.2 release

Version v0.17.2 release #12

Workflow file for this run

name: Publish Release
env:
BuildDir: ./bld
ScriptDir: ./scripts
Product: HawDict
Prerelease: false
on:
push:
tags:
- 'v*'
defaults:
run:
shell: pwsh
jobs:
pub_create_github_release:
name: Create Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Release Notes
run: ${{ env.ScriptDir }}/CreateReleaseNotes.ps1
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ env.Product }} ${{ github.ref }}
body_path: ${{ env.BuildDir }}/ReleaseNotes.md
draft: false
prerelease: ${{ env.Prerelease }}
pub_build_windows:
name: Publish Windows Build
runs-on: windows-latest
needs: pub_create_github_release
strategy:
matrix:
target: [Unpacked, Win32, Win64]
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Checkout
uses: actions/checkout@v4
- name: Build ${{ matrix.target }}
run: ${{ env.ScriptDir }}/Build${{ matrix.target }}.ps1
- name: Upload ${{ matrix.target }} Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.pub_create_github_release.outputs.upload_url }}
asset_path: ${{ env.BuildDir }}/${{ env.Product }}.${{ matrix.target }}.zip
asset_name: ${{ env.Product }}.${{ matrix.target }}.zip
asset_content_type: application/zip
pub_build_linux:
name: Publish Linux Build
runs-on: ubuntu-latest
needs: pub_create_github_release
strategy:
matrix:
target: [Linux]
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Checkout
uses: actions/checkout@v4
- name: Build ${{ matrix.target }}
run: ${{ env.ScriptDir }}/Build${{ matrix.target }}.ps1
- name: Upload ${{ matrix.target }} Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.pub_create_github_release.outputs.upload_url }}
asset_path: ${{ env.BuildDir }}/${{ env.Product }}.${{ matrix.target }}.tar.gz
asset_name: ${{ env.Product }}.${{ matrix.target }}.tar.gz
asset_content_type: application/gzip
pub_build_macos:
name: Publish MacOS Build
runs-on: macOS-latest
needs: pub_create_github_release
strategy:
matrix:
target: [MacOS]
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Checkout
uses: actions/checkout@v4
- name: Build ${{ matrix.target }}
run: ${{ env.ScriptDir }}/Build${{ matrix.target }}.ps1
- name: Upload ${{ matrix.target }} Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.pub_create_github_release.outputs.upload_url }}
asset_path: ${{ env.BuildDir }}/${{ env.Product }}.${{ matrix.target }}.tar.gz
asset_name: ${{ env.Product }}.${{ matrix.target }}.tar.gz
asset_content_type: application/gzip