-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 1.63 KB
/
main.yml
File metadata and controls
68 lines (57 loc) · 1.63 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: Main
on:
push:
branches: [main]
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
deploy-and-publish:
runs-on: ubuntu-latest
outputs:
published: ${{ steps.changesets.outputs.published }}
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 22.22.1
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: Update npm
run: npm install -g npm@latest
- name: Install and Build 🔧
run: |
pnpm i
pnpm build
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version from package.json
id: version
if: steps.changesets.outputs.published == 'true'
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Published version: $VERSION"
bump-app-catalog:
needs: deploy-and-publish
if: needs.deploy-and-publish.outputs.published == 'true'
permissions:
contents: read
issues: write
uses: ./.github/workflows/bump-app-catalog.yml
with:
version: ${{ needs.deploy-and-publish.outputs.version }}
secrets: inherit