7. Publish - Prisma CLI version 6.18.0-dev.19 #5046
This file contains hidden or 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: 7. Publish | |
run-name: 7. Publish - ${{ inputs.trigger_reason }} | |
on: | |
workflow_dispatch: | |
inputs: | |
asset_name: | |
description: 'Name of the .vsix file in the release' | |
required: true | |
tag_name: | |
description: 'The release version/tag to fetch from.' | |
required: true | |
trigger_reason: | |
description: 'Information about what caused the publishing process in the first place.' | |
required: true | |
env: | |
ENVIRONMENT: ${{ secrets.ENVIRONMENT }} | |
PRISMA_TELEMETRY_INFORMATION: 'language-tools 7_publish.yml' | |
jobs: | |
marketplace: | |
name: Publish to marketplace | |
runs-on: ubuntu-latest | |
timeout-minutes: 7 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PRISMA_BOT_TOKEN }} | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- name: Print inputs | |
run: | | |
echo ${{github.event.inputs.asset_name}} | |
echo ${{github.event.inputs.tag_name}} | |
echo ${{github.event.inputs.trigger_reason}} | |
- name: Install Dependencies | |
run: npm install && npm run bootstrap | |
# Download Asset from GH release and publish to VS Code marketplace | |
- uses: dsaltares/fetch-gh-release-asset@master | |
with: | |
repo: 'prisma/language-tools' | |
version: 'tags/${{ github.event.inputs.tag_name }}' | |
file: ${{ github.event.inputs.asset_name }} | |
token: ${{ secrets.PRISMA_BOT_TOKEN }} | |
- name: publish vsix to marketplace | |
run: cd packages/vscode && npx vsce publish --pat ${{ secrets.AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN}} --packagePath ${{github.workspace}}/${{ github.event.inputs.asset_name }} | |
open-vsx: | |
name: Publish to open-vsx | |
runs-on: ubuntu-latest | |
timeout-minutes: 7 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- name: Print inputs | |
run: | | |
echo ${{github.event.inputs.trigger_reason}} | |
- name: Install Dependencies | |
run: npm install && npm run bootstrap | |
# Download Asset from GH release and publish to open-vsx | |
- uses: dsaltares/fetch-gh-release-asset@master | |
with: | |
repo: 'prisma/language-tools' | |
version: 'tags/${{ github.event.inputs.tag_name }}' | |
file: ${{ github.event.inputs.asset_name }} | |
token: ${{ secrets.PRISMA_BOT_TOKEN }} | |
- name: Publish vsix to open-vsx.org | |
run: cd packages/vscode && npx ovsx --debug publish ${{github.workspace}}/${{ github.event.inputs.asset_name }} --pat ${{ secrets.OPEN_VSX_ACCESS_TOKEN }} |