Skip to content

Add ghcr.io prefix to image name #18

Add ghcr.io prefix to image name

Add ghcr.io prefix to image name #18

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@v3
- 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 :grammars: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,grammars}/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 }}