Skip to content

fix: notify workflow #8

fix: notify workflow

fix: notify workflow #8

Workflow file for this run

name: Release

Check failure on line 1 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

(Line: 70, Col: 16): Job 'build-windows' depends on unknown job 'quality-gate'., (Line: 115, Col: 16): Job 'build-mac' depends on job 'build-windows' which creates a cycle in the dependency graph., (Line: 151, Col: 16): Job 'build-linux' depends on job 'build-windows' which creates a cycle in the dependency graph.
on:
push:
tags:
- 'v*.*.*'
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: write
packages: read
actions: read
env:
NODE_VERSION: 20
PNPM_VERSION: 10.0.0
CI: true
FORCE_COLOR: 1
jobs:
preflight:
name: Preflight Validation
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Print context
run: |
echo "Ref: $GITHUB_REF"
echo "Tag: ${{ github.ref_name }}"
echo "Actor: $GITHUB_ACTOR"
echo "SHA: $GITHUB_SHA"
- name: Validate tag format
run: |
if [[ ! "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Invalid tag format"
exit 1
fi
- name: Ensure clean git tree
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "Working tree is dirty"
exit 1
fi
- name: Extract version from package.json
run: |
VERSION=$(jq -r .version package.json)
TAG="${{ github.ref_name }}"
TAG_VERSION="${TAG#v}"
if [[ "$VERSION" != "$TAG_VERSION" ]]; then
echo "package.json version ($VERSION) != tag ($TAG_VERSION)"
exit 1
fi
build-windows:
name: Build Windows & Create Release
runs-on: windows-latest
needs: quality-gate
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: pnpm store cache
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: windows-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Build Windows
run: pnpm run build:windows
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
generate_release_notes: true
files: |
apps/desktop/build/Datary-Setup-*.exe
apps/desktop/build/Datary-*.exe
apps/desktop/build/Datary-*.msi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-mac:
name: MacOS Build
runs-on: macos-latest
needs: build-windows
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Build macOS
run: pnpm run build:mac
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload macOS assets
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
overwrite_files: true
files: |
apps/desktop/build/Datary-*.dmg
apps/desktop/build/Datary-*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-linux:
name: Linux Build
runs-on: ubuntu-latest
needs: build-windows
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Build Linux
run: pnpm run build:linux
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Linux assets
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
overwrite_files: true
files: |
apps/desktop/build/Datary-*.AppImage
apps/desktop/build/Datary-*.deb
apps/desktop/build/Datary-*.rpm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}