forked from mediathekview/MServer
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 1.15 KB
/
release.yml
File metadata and controls
31 lines (29 loc) · 1.15 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
name: Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
java-package: jdk+fx
- name: Build and test
run: ./gradlew check developTest build
- name: Publish to the Maven Central Repository
run: ./gradlew release -PSONATYPE_USERNAME=${{ secrets.OSSRH_USERNAME }} -PSONATYPE_PASSWORD=${{ secrets.OSSRH_TOKEN }}
env:
ORG_GRADLE_PROJECT_signingKeyId: CE3BA5E0
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
- name: Build and deploy docker
run: |
export VERSION=$(find . -name "MServer-*.tar.gz" | sed "s/.*MServer-\(.*\).tar.gz/\1/")
docker build . -t mediathekview/mserver:$VERSION -t mediathekview/mserver:latest --build-arg VERSION=$VERSION
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
docker push mediathekview/mserver