Skip to content

Merge pull request #585 from fwcd/make-codegen-optional #27

Merge pull request #585 from fwcd/make-codegen-optional

Merge pull request #585 from fwcd/make-codegen-optional #27

Workflow file for this run

name: Deploy
on:
push:
tags:
- '*'
jobs:
deploy:
runs-on: ubuntu-latest
if: github.repository == 'fwcd/kotlin-language-server'
steps:
- uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Get tag name
id: tag
run: |
tag=$(basename "${{ github.ref }}")
echo "tag=$tag" >> $GITHUB_OUTPUT
- name: Build distribution
run: ./gradlew :server:distZip
- name: Create release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
tag="${{ steps.tag.outputs.tag }}"
gh release create "$tag" --title "Version $tag"
- name: Upload assets
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: |
tag="${{ steps.tag.outputs.tag }}"
gh release upload "$tag" server/build/distributions/*
- name: Deploy Maven artifacts to GitHub Packages
run: ./gradlew :shared:publish :server:publish
env:
GPR_USERNAME: ${{ github.actor }}
GPR_PASSWORD: ${{ secrets.GITHUB_TOKEN }}