-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (36 loc) · 1.48 KB
/
release-version.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
name: Release new version
on:
workflow_dispatch:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
name: Release version
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Get version
run: echo "Releasing version ${{ github.event.release.tag_name }}"
- name: Verify release
run: ./gradlew verifyRelease -Prelease.disableRemoteCheck
- name: Publish version
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: ./gradlew publish -PapmtRepositoryUsername=$OSSRH_USERNAME -PapmtRepositoryPassword=$OSSRH_PASSWORD -Dorg.gradle.internal.http.socketTimeout=120000 -Dorg.gradle.internal.http.connectionTimeout=120000 --stacktrace
- name: Prepare release artifacts
run: |
mkdir artifacts
find ./core/build/libs -name "*.jar" -print0 | xargs -0 cp -t "artifacts"
find ./artifacts -name '*.jar' -exec bash -c ' mv $0 ${0/core/apmt}' {} \;
- name: Upload Release Asset
uses: skx/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
releaseId: ${{ github.event.release.id }}
args: './artifacts/apmt-*[0-9].jar'