-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (53 loc) · 1.86 KB
/
Copy pathrelease.yml
File metadata and controls
63 lines (53 loc) · 1.86 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
# .github/workflows/release.yml
name: Release Caly-Xano CLI
on:
push:
branches:
- main
jobs:
release:
if: github.repository == 'calycode/xano-tools' && github.repository_owner == 'calycode'
name: Release CLI
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: true
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
scope: '@calycode'
always-auth: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: pnpm install
- name: Build packages
run: pnpm build:packages
- name: Publish to npm
id: changesets
uses: changesets/action@v1
with:
commit: 'changeset-release'
title: 'Release Version'
publish: pnpm -r publish --access restricted
env:
GITHUB_TOKEN: ${{ secrets.CHANGESETS_GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Log Changesets outputs
run: |
echo "published: ${{ steps.changesets.outputs.published }}"
echo "publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}"
echo "hasChangesets: ${{ steps.changesets.outputs.hasChangesets }}"
# Upload docs to GCP ONLY after publishing
- name: Upload docs
if: steps.changesets.outputs.published == 'true'
uses: './.github/actions/upload-docs'
with:
gcp_credentials: '${{ secrets.GCP_CREDENTIALS }}'