Skip to content

v0.11.3

v0.11.3 #373

Workflow file for this run

name: Release App
on:
push:
tags:
- 'v*.*.*'
paths-ignore:
- 'README.md'
- 'docs/**'
- '.vscode'
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
- 'README.md'
- '.vscode'
concurrency:
group: release-ci-group
cancel-in-progress: true
jobs:
Linux:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'true'
# - name: Install native dependencies for flatpack
# run: sudo apt-get install -y flatpak-builder elfutils
# - name: Install Snapcraft
# uses: samuelmeuli/action-snapcraft@v1
# with:
# snapcraft_token: ${{ secrets.SNAP_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
# disable pnpm cache so it always install based on npm_config_arch
# - uses: actions/cache@v3
# name: Setup pnpm cache
# with:
# path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-store-
# only run codeql on Linux
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: javascript
- name: Install dependencies (x64)
run: pnpm install && pnpm remove registry-js
env:
# for dugute, see node_modules/.pnpm/[email protected]/node_modules/dugite/script/config.js
npm_config_arch: x64
- name: Make Linux (x64)
run: pnpm run make:linux-x64
env:
CI: true
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies (arm64)
run: pnpm install dugite --force
env:
npm_config_arch: arm64
- name: Make Linux (arm64)
run: pnpm run make:linux-arm
env:
CI: true
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
generate_release_notes: true
files: out/make/**/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get Renderer Bundle Stats
uses: vio/bundle-stats-action@v1
with:
id: renderer
webpack-stats-path: 'out/webpack-stats-renderer.json'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Get Main Bundle Stats
uses: vio/bundle-stats-action@v1
with:
id: main
webpack-stats-path: 'out/webpack-stats-main.json'
repo-token: ${{ secrets.GITHUB_TOKEN }}
MacOS:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 9
# - name: Get pnpm store directory
# id: pnpm-cache
# shell: bash
# run: |
# echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
# - uses: actions/cache@v3
# name: Setup pnpm cache
# with:
# path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-store-
- name: Install dependencies (x64)
run: pnpm install && pnpm remove registry-js
env:
npm_config_arch: x64
- name: Make macOS (x64)
run: pnpm run make:mac-x64
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
CI: true
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies (arm64)
run: pnpm install dugite --force
env:
npm_config_arch: arm64
- name: Make macOS (arm64)
run: pnpm run make:mac-arm
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
CI: true
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
generate_release_notes: true
files: out/make/**/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get Renderer Bundle Stats
uses: vio/bundle-stats-action@v1
with:
id: renderer
webpack-stats-path: 'out/webpack-stats-renderer.json'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Get Main Bundle Stats
uses: vio/bundle-stats-action@v1
with:
id: main
webpack-stats-path: 'out/webpack-stats-main.json'
repo-token: ${{ secrets.GITHUB_TOKEN }}
Windows:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Set up CV dependency for pngquant-bin
uses: ilammy/msvc-dev-cmd@v1
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
# - uses: actions/cache@v3
# name: Setup pnpm cache
# with:
# path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-store-
- name: Install dependencies (x64)
run: pnpm install
env:
npm_config_arch: x64
# - name: Add msi to path
# run: echo "${env:wix}bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
# Enable x32 if someone still need it
# - name: Make Windows (ia32)
# run: pnpm run make:win-ia32
# env:
# CSC_LINK: ${{ secrets.WIN_CERT }}
# CSC_KEY_PASSWORD: ${{ secrets.WIN_CERT_PASS }}
# CI: true
# CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Rename (ia32)
# run: |
# Get-ChildItem out/make/wix/ia32
# Rename-Item -Path "out/make/wix/ia32/TidGi.msi" -NewName "Install-TidGi-Windows-ia32.msi"
- name: Make Windows (x64)
run: pnpm run make:win-x64
env:
CSC_LINK: ${{ secrets.WIN_CERT }}
CSC_KEY_PASSWORD: ${{ secrets.WIN_CERT_PASS }}
CI: true
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Rename (x64)
# run: |
# Get-ChildItem out/make/wix/x64
# Rename-Item -Path "out/make/wix/x64/TidGi.msi" -NewName "Install-TidGi-Windows-x64.msi"
- name: Install dependencies (arm64)
run: pnpm install dugite --force
env:
# based on TiddlyGit-Desktop/node_modules/.pnpm/[email protected]/node_modules/dugite/script/config.js
npm_config_arch: ia32
- name: Make Windows (arm64)
run: pnpm run make:win-arm
env:
CSC_LINK: ${{ secrets.WIN_CERT }}
CSC_KEY_PASSWORD: ${{ secrets.WIN_CERT_PASS }}
CI: true
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Rename (arm64)
# run: |
# Get-ChildItem out/make/wix/arm64
# Rename-Item -Path "out/make/wix/arm64/TidGi.msi" -NewName "Install-TidGi-Windows-arm64.msi"
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
generate_release_notes: true
# out/make/**/*.msi
files: |
out/make/**/*.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get Renderer Bundle Stats
uses: vio/bundle-stats-action@v1
with:
id: renderer
webpack-stats-path: 'out/webpack-stats-renderer.json'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Get Main Bundle Stats
uses: vio/bundle-stats-action@v1
with:
id: main
webpack-stats-path: 'out/webpack-stats-main.json'
repo-token: ${{ secrets.GITHUB_TOKEN }}