-
Notifications
You must be signed in to change notification settings - Fork 54
89 lines (75 loc) · 2.22 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Release
on:
workflow_dispatch:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Debug Permissions
run: |
ls -la
ls -la integrations/
ls -la integrations/directus/
- name: Check for [skip i18n]
run: |
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
if echo "$COMMIT_MESSAGE" | grep -iq '\[skip i18n\]'; then
echo "Skipping i18n checks due to [skip i18n] in commit message."
exit 0
fi
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 18.20.4
- name: Install pnpm
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 9.12.3
run_install: false
- name: Configure pnpm cache
id: pnpm-cache
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
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 deps
run: pnpm install
- name: Lingo.dev
uses: ./
with:
api-key: ${{ secrets.REPLEXICA_API_KEY }}
pull-request: true
env:
GH_TOKEN: ${{ github.token }}
- name: Setup
run: |
pnpm turbo telemetry disable
- name: Configure Turbo cache
uses: dtinth/setup-github-actions-caching-for-turbo@v1
- name: Build
run: pnpm turbo build --force
- name: Test
run: pnpm turbo test --force
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
title: "chore: bump package versions"
version: pnpm changeset version
publish: pnpm changeset publish
commit: "chore: bump package version"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}