-
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (49 loc) · 1.6 KB
/
Copy pathdeploy.yml
File metadata and controls
50 lines (49 loc) · 1.6 KB
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
46
47
48
49
50
name: Deploy
on:
push:
tags: ['v*']
jobs:
deploy:
name: Deploy
runs-on: namespace-profile-linux-default
steps:
- uses: namespacelabs/nscloud-checkout-action@v9
- uses: actions/setup-java@v6
with:
distribution: 'temurin'
java-version: 21
cache: "" # namespace handles this
- name: Set up cache
uses: namespacelabs/nscloud-cache-action@v1
with:
cache: gradle
- name: Setup gradle build cache
run: |
nsc cache gradle setup --init-gradle /tmp/init.gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-disabled: true # namespace handles this
- name: Deploy
run: ./gradlew --init-script=/tmp/init.gradle build publishCodebookPublicationToPapermcRepository --stacktrace
env:
ORG_GRADLE_PROJECT_papermcUsername: ${{ secrets.ARTIFACTORY_USERNAME }}
ORG_GRADLE_PROJECT_papermcPassword: ${{ secrets.ARTIFACTORY_PASSWORD }}
- name: Get tag name
id: get_tag
shell: bash
run: |
tag_name="$(echo $GITHUB_REF | cut -d / -f 3)"
echo "tag=$tag_name" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.get_tag.outputs.tag }}
name: 'Release ${{ steps.get_tag.outputs.tag }}'
prerelease: false
draft: false
files: |
build/libs/*.jar
codebook-cli/build/libs/*-all.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}