-
-
Notifications
You must be signed in to change notification settings - Fork 51
148 lines (125 loc) · 4.67 KB
/
release-please.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: release-please
on:
push:
branches: [main]
workflow_dispatch:
inputs:
force-release-theme:
description: "Force a release of catppuccin-vsc"
default: false
type: boolean
rev:
description: "The revision to clone for the release"
default: ""
type: string
force-release-theme-tag:
description: "The version to release catppuccin-vsc as"
default: ""
type: string
force-release-pack:
description: "Force a release of catppuccin-vsc-pack"
default: false
type: boolean
force-release-npm:
description: "Force a release of @catppuccin/vscode"
default: false
type: boolean
jobs:
release-please:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
outputs:
theme_release: ${{ github.event.inputs.force-release-theme == 'true' || steps.release.outputs['packages/catppuccin-vsc--release_created'] == 'true' }}
theme_tag: ${{ github.event.inputs.force-release-theme-tag || steps.release.outputs['packages/catppuccin-vsc--tag_name'] }}
pack_release: ${{ github.event.inputs.force-release-pack == 'true' || steps.release.outputs['packages/catppuccin-vsc-pack--release_created'] == 'true' }}
npm_release: ${{ github.event.inputs.force-release-npm == 'true' || steps.release.outputs['packages/catppuccin-vscode--release_created'] == 'true' }}
release-vscode:
permissions:
contents: write
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.theme_release == 'true' }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.rev || github.sha }}
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
- run: yarn install --immutable
- name: Build VSCode
id: build-vscode
run: yarn core:build
- name: Build Azure Data Studio
id: build-ads
run: yarn core:build-ads
- name: Publish to Visual Studio Marketplace
working-directory: ./packages/catppuccin-vsc
run: |
npx @vscode/vsce publish --pat "${{ secrets.VS_MARKETPLACE_TOKEN }}" --packagePath "${{ steps.build-vscode.outputs.vsixPath }}"
- name: Publish to Open VSX Registry
working-directory: ./packages/catppuccin-vsc
# continue even if OpenVSX fails
# -> see https://github.com/catppuccin/vscode/issues/51
continue-on-error: true
timeout-minutes: 10
run: |
npx ovsx publish --pat "${{ secrets.OPEN_VSX_TOKEN }}" --packagePath "${{ steps.build-vscode.outputs.vsixPath }}"
- name: Add files to GH Release
working-directory: ./packages/catppuccin-vsc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ needs.release-please.outputs.theme_tag }} catppuccin-*.vsix
release-pack:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.pack_release == 'true' }}
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
- run: yarn install --immutable
- run: yarn pack:build
- name: Publish to Visual Studio Marketplace
working-directory: ./packages/catppuccin-vsc-pack
run: |
npx @vscode/vsce publish --pat "${{ secrets.VS_MARKETPLACE_TOKEN }}" --packagePath ./catppuccin-vsc-pack.vsix
- name: Publish to Open VSX Registry
working-directory: ./packages/catppuccin-vsc-pack
# continue even if OpenVSX fails
# -> see https://github.com/catppuccin/vscode/issues/51
continue-on-error: true
timeout-minutes: 10
run: |
npx ovsx publish --pat "${{ secrets.OPEN_VSX_TOKEN }}" --packagePath ./catppuccin-vsc-pack.vsix
release-npm:
permissions:
id-token: write
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.npm_release == 'true' }}
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
registry-url: https://registry.npmjs.org
- run: yarn install --immutable
- name: Publish compiled NPM package
working-directory: ./packages/catppuccin-vscode
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --provenance