Skip to content

Release

Release #31

Workflow file for this run

name: Release
on:
create:
tags:
- 'v*'
workflow_dispatch:
inputs:
developmentVersion:
description: "Default version to use for new local working copy."
required: true
default: "X.Y.Z-SNAPSHOT"
env:
WEBRTC_CACHE_BRANCH: 6998
WEBRTC_CHECKOUT_FOLDER: webrtc
WEBRTC_INSTALL_FOLDER: webrtc/build
jobs:
prepare-release:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
- id: prepare
name: Prepare release build
uses: ./.github/actions/prepare-linux
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Update development version
uses: actions/checkout@v4
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- run: |
mvn release:prepare -DskipTests -DpushChanges=false -DdevelopmentVersion=${{ github.event.inputs.developmentVersion }}
git push
git push --tags
build-windows:
needs: prepare-release
strategy:
fail-fast: false
matrix:
platform:
- name: windows_x86_64
runs-on: windows-2022
java: [17]
runs-on: ${{ matrix.platform.runs-on }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true
- name: Get tag from current branch
id: tag-selector
shell: bash
run: |
git fetch -a
tag=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "tag=$tag" >> "$GITHUB_OUTPUT"
git checkout $tag
- id: prepare
name: Prepare release build
uses: ./.github/actions/prepare-windows
- id: maven-build
name: Maven build
uses: ./.github/actions/release
with:
java-version: ${{ matrix.java }}
platform-name: ${{ matrix.platform.name }}
maven-username: ${{ secrets.MAVEN_USERNAME }}
maven-password: ${{ secrets.MAVEN_TOKEN }}
maven-gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
maven-gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
build-linux:
needs: prepare-release
strategy:
fail-fast: false
matrix:
platform:
- name: linux_arm
runs-on: ubuntu-22.04
- name: linux_arm64
runs-on: ubuntu-22.04
- name: linux_x86-64
runs-on: ubuntu-22.04
java: [17]
runs-on: ${{ matrix.platform.runs-on }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true
- name: Get tag from current branch
id: tag-selector
run: |
git fetch -a
tag=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "tag=$tag" >> "$GITHUB_OUTPUT"
git checkout $tag
- id: prepare-build
name: Prepare release build
uses: ./.github/actions/prepare-linux
- name: Create Release # Create the release only once on Linux
if: ${{ matrix.platform.name == 'linux_x86-64' }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag-selector.outputs.tag }}
release_name: Release ${{ steps.tag-selector.outputs.tag }}
draft: false
prerelease: false
- id: maven-build
name: Maven build
uses: ./.github/actions/release
with:
java-version: ${{ matrix.java }}
platform-name: ${{ matrix.platform.name }}
maven-username: ${{ secrets.MAVEN_USERNAME }}
maven-password: ${{ secrets.MAVEN_TOKEN }}
maven-gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
maven-gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
build-macos:
needs: prepare-release
strategy:
fail-fast: false
matrix:
platform:
- name: macos_x86-64
runs-on: macos-13
- name: macos_arm64
runs-on: macos-14
java: [17]
runs-on: ${{ matrix.platform.runs-on }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-tags: true
- name: Get tag from current branch
id: tag-selector
run: |
git fetch -a
tag=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "tag=$tag" >> "$GITHUB_OUTPUT"
git checkout $tag
- id: prepare-build
name: Prepare release build
uses: ./.github/actions/prepare-macos
- id: maven-build
name: Maven build
uses: ./.github/actions/release
with:
java-version: ${{ matrix.java }}
platform-name: ${{ matrix.platform.name }}
maven-username: ${{ secrets.MAVEN_USERNAME }}
maven-password: ${{ secrets.MAVEN_TOKEN }}
maven-gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
maven-gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}