build(nix): fix for new sourceRoot attribute (#368) #256
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
mark-vscode-theme-as-latest: | |
runs-on: ubuntu-latest | |
# always run after all other jobs | |
if: ${{ always() }} | |
needs: | |
- release-please | |
- release-vscode | |
- release-pack | |
- release-npm | |
steps: | |
- name: Mark VSCode theme release as latest release | |
run: gh release edit ${{ needs.release-please.outputs.theme_tag }} --latest | |
if: ${{ needs.release-please.outputs.theme_release == 'true' }} |