Skip to content

Commit

Permalink
test build cache
Browse files Browse the repository at this point in the history
  • Loading branch information
OKendigelyan committed Nov 22, 2024
1 parent c344a31 commit f96d738
Showing 1 changed file with 61 additions and 9 deletions.
70 changes: 61 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,40 @@ on:
- "v*.*.*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- uses: pnpm/action-setup@v3
with:
version: 9.9.0

- name: Cache turbo build
uses: actions/cache@v4
with:
path: .turbo
key: turbo-${{ github.sha }}
restore-keys: |
turbo-
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20.18.0
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Build project
working-directory: apps/desktop
run: pnpm turbo build

create-draft-release:
runs-on: ubuntu-latest
needs: build
environment: "Production – umami-v2"
permissions:
contents: write
Expand All @@ -23,9 +55,9 @@ jobs:

create-release-linux:
runs-on: ubuntu-latest
needs: create-draft-release
needs: [build, create-draft-release]
permissions:
contents: write
contents: write
environment: "Production – umami-v2"
steps:
- name: Check out code
Expand All @@ -44,8 +76,17 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build
- name: Cache turbo build
uses: actions/cache@v4
with:
path: .turbo
key: turbo-${{ github.sha }}
restore-keys: |
turbo-
- name: Build project
working-directory: apps/desktop
run: pnpm turbo build

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
Expand All @@ -57,7 +98,9 @@ jobs:

- name: Generate deb and rpm files
working-directory: apps/desktop
run: CI=false pnpm electron:package:linux -p never
env:
CI: false
run: pnpm electron:package:linux -p never

- name: Sign the deb and rpm files using dpkg-sig and rpm-sign
working-directory: apps/desktop
Expand All @@ -69,13 +112,13 @@ jobs:
- name: Upload deb and rpm files
working-directory: apps/desktop
run: gh release upload ${{ github.ref_name }} ./dist/*.deb ./dist/*.rpm
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.ref_name }} ./dist/*.deb ./dist/*.rpm

create-release-mac:
runs-on: macos-latest
needs: create-draft-release
needs: [build, create-draft-release]
environment: "Production – umami-v2"
permissions:
contents: write
Expand All @@ -96,8 +139,17 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build
- name: Cache turbo build
uses: actions/cache@v4
with:
path: .turbo
key: turbo-${{ github.sha }}
restore-keys: |
turbo-
- name: Build project
working-directory: apps/desktop
run: pnpm turbo build

- name: Build and sign mac app
working-directory: apps/desktop
Expand Down

0 comments on commit f96d738

Please sign in to comment.