-
Notifications
You must be signed in to change notification settings - Fork 22
52 lines (48 loc) · 1.56 KB
/
publish.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
name: Create release
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
default: '0.1.0'
required: true
jobs:
publish:
name: Publish library at mavenCentral
runs-on: ${{ matrix.os }}
env:
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_KEY: ${{ secrets.OSSRH_KEY }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEYID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.GPG_KEY_CONTENTS }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Plugin publish
run: ./gradlew -p kswift-gradle-plugin publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_PLUGIN_PORTAL_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PLUGIN_PORTAL_SECRET }}
if: matrix.os == 'ubuntu-latest'
- name: Runtime publish
run: ./gradlew publish -DIS_MAIN_HOST=${{ matrix.os == 'ubuntu-latest' }}
release:
name: Create release
needs: publish
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitish: ${{ github.ref }}
tag_name: release/${{ github.event.inputs.version }}
release_name: ${{ github.event.inputs.version }}
body: "Will be filled later"
draft: true