generated from wuespace/telestion-extension-template
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.71 KB
/
publish-packages.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
46
47
48
49
50
51
52
53
54
55
56
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# This workflow is intended to use with the release workflow also provided in this repository.
#
# ******** NOTE ********
# If you need access to the GitHub Maven package registry from other repositories,
# create a personal access token with the following scopes:
# - read:packages
# and name it "READ_PACKAGES".
# After this step, overwrite the default GITHUB_TOKEN environment variable with the created PAT
# in the gradle build and test steps.
name: Publish packages
# Events that trigger this workflow
on:
workflow_run:
workflows: ["Release"]
types: [completed]
jobs:
publish:
name: Publish packages to the GitHub Registry
runs-on: ubuntu-latest
steps:
- name: Checkout 📥
uses: actions/[email protected]
- name: Set up JDK 16 💿
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: '16'
java-package: jdk
- name: Download build environment 📥
uses: dawidd6/[email protected]
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
workflow_conclusion: success
name: build-env
path: ${{ github.workspace }}
- name: Import environment ⛓
run: cat .build-env >> $GITHUB_ENV
- name: Install dependencies 📚
run: chmod +x gradlew && ./gradlew
env:
GITHUB_TOKEN: ${{ secrets.READ_PACKAGES }}
- name: Publish packages 🗜
run: chmod +x gradlew && ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ env.version }}