Skip to content

Titan v1.2.6 Release #13

Titan v1.2.6 Release

Titan v1.2.6 Release #13

Workflow file for this run

name: Build and Publish Titan Electron App
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [macos-latest, ubuntu-latest, windows-latest]
os: [windows-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Important for generating the changelog
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: npm ci
- name: Generate Changelog
id: changelog
shell: pwsh
run: |
$PreviousTag = git describe --tags --abbrev=0 HEAD^ 2>$null
if (-not $PreviousTag) {
$Changelog = git log --pretty=format:"- %s"
} else {
$Changelog = git log --pretty=format:"- %s" "$PreviousTag..HEAD"
}
$Changelog = $Changelog -join "`n"
"CHANGELOG<<EOF" >> $env:GITHUB_OUTPUT
$Changelog >> $env:GITHUB_OUTPUT
"EOF" >> $env:GITHUB_OUTPUT
- name: Create Draft Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Titan ${{ github.ref }}
body: |
## Changelog:
${{ steps.changelog.outputs.CHANGELOG }}
draft: true
prerelease: false
- name: Build and Publish Electron App
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
run: |
if ("${{ matrix.os }}" -eq "windows-latest") {
npm run publish:win
} elseif ("${{ matrix.os }}" -eq "macos-latest") {
npm run publish:mac
} else {
npm run publish:linux
}