tdlight-java/.github/workflows/maven-publish.yml
Andrea Cavalli b27c736866 Use TDLib 1.7.10, add BOM, fix null updates, rewrite pom.xml
Fix #64: null updates sent to the updates handler
Fix gradle import issue (#61) by rewriting the maven dependency structure, and adding a BOM to being able to keep the natives version in sync with tdlight-java version
Fix #63 by adding the required dependencies for windows, linux and macOS in the README.md
2021-12-08 02:24:23 +01:00

67 lines
2.3 KiB
YAML

# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
name: Maven Package
on:
push:
jobs:
build:
strategy:
matrix:
include:
- { os: ubuntu-20.04, arch: "linux/amd64" }
runs-on: ${{ matrix.os }}
steps:
- name: Branch name
id: branch_name
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
echo ::set-output name=SOURCE_TAG_VERSION::${GITHUB_REF#refs/tags/v}
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Setup variables
shell: bash
run: |
# ====== Variables
export REVISION=${{ steps.branch_name.outputs.SOURCE_TAG_VERSION }}
echo "REVISION=$REVISION" >> $GITHUB_ENV
- name: Set up JDK 17 (Snapshot)
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/setup-java@v1
with:
java-version: 17
server-id: mchv-snapshot-distribution
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build (Snapshot)
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
shell: bash
run: |
source ./scripts/continuous-integration/github-workflows/deploy-snapshot.sh
env:
MAVEN_USERNAME: ${{ secrets.MCHV_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MCHV_TOKEN }}
- name: Set up JDK 17 (Release)
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: actions/setup-java@v1
with:
java-version: 17
server-id: mchv-release-distribution
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Deploy to Maven (Release)
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
shell: bash
run: |
echo "REVISION: $REVISION"
source ./scripts/continuous-integration/github-workflows/deploy-release.sh
env:
MAVEN_USERNAME: ${{ secrets.MCHV_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MCHV_TOKEN }}