-
Notifications
You must be signed in to change notification settings - Fork 6
40 lines (34 loc) · 1.4 KB
/
publish-github-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
# This is a manually triggered workflow (hence on: workflow_dispatch).
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#manual-events
name: Publish to GitHub Packages
on:
workflow_dispatch:
inputs:
version:
description: 'Version, without v prefix, appended to v to locate tag'
required: true
jobs:
publish:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v3
with:
ref: v${{ github.event.inputs.version }}
# Gradle 7 requires Java 11 to run
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: '19'
- name: Publish to Repositories
env:
ORG_GRADLE_PROJECT_MAPBOX_DOWNLOADS_TOKEN: ${{ secrets.MAPBOX_DOWNLOADS_TOKEN }}
ORG_GRADLE_PROJECT_GITHUB_ACTOR: ${{ github.actor }}
ORG_GRADLE_PROJECT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_SIGNING_KEY_ID: ${{ secrets.MAVEN_SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.MAVEN_SIGNING_KEY_PASSWORD }}
ORG_GRADLE_PROJECT_SIGNING_KEY_BASE64: ${{ secrets.MAVEN_SIGNING_KEY_RING_FILE_BASE64 }}
run: |
echo "Publishing version ${{ github.event.inputs.version }} to GitHub Packages..."
./gradlew publish --stacktrace -PpublishTarget=GitHubPackages -PruntimeSecrets=USE_DUMMY_EMPTY_STRING_VALUES