-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (57 loc) · 1.66 KB
/
Copy pathpublish.yml
File metadata and controls
68 lines (57 loc) · 1.66 KB
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
name: Build and Publish
on:
workflow_dispatch:
push:
branches:
- "**"
tags-ignore:
- "**"
env:
SECRETS: ${{ toJSON(secrets) }}
GITHUB_TOKEN: ${{ secrets.SHARED_GH_TOKEN }}
jobs:
build:
name: Publish Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.sha}}
fetch-depth: 0
- uses: actions/checkout@v4
with:
repository: journeyapps-platform/ci-actions
token: ${{ secrets.SHARED_GH_TOKEN }}
path: .github/ci
ref: v1
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 22.16
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 10
- name: Install Dependencies
uses: ./.github/ci/actions/npm-install
with:
client: pnpm
- name: Has changesets
uses: bluwy/detect-changesets-action@v1
id: detect
- name: Build
run: pnpm build
- name: Create Release Pull Request or Publish to npm
if: ${{ github.ref == 'refs/heads/master' && steps.detect.outputs.has-changesets == 'true' }}
id: changesets
uses: changesets/action@v1.4.1
with:
version: pnpm ci:version
commit: "chore: update versions"
title: "[Chore] update versions"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish production packages.
if: ${{ github.ref == 'refs/heads/master' && steps.detect.outputs.has-changesets == 'false' && success() }}
run: |
pnpm ci:publish