-
Notifications
You must be signed in to change notification settings - Fork 218
45 lines (44 loc) · 1.3 KB
/
deploy.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
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 }}