Skip to content

Release

Release #23

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: 4844
WEBRTC_CHECKOUT_FOLDER: webrtc
WEBRTC_INSTALL_FOLDER: webrtc/build
jobs:
prepare-release:
runs-on: ubuntu-20.04
steps:
- name: Disk cleanup
run: |
set -x
df -h
#sudo du -h -d1 /usr/local
#sudo du -h -d1 /usr/local/share
#sudo du -h -d1 /usr/local/lib
#sudo du -h -d1 /usr/share
# 4.6G
sudo rm -rf /usr/local/.ghcup
# 1.7G
sudo rm -rf /usr/share/swift
# 1.4G
sudo rm -rf /usr/share/dotnet
# 13G
sudo rm -rf /usr/local/lib/android
df -h
- name: Install required packages
run: |
sudo apt-get update
sudo apt-get install -y pulseaudio libpulse-dev libasound2-dev libdbus-1-dev libudev-dev libv4l-dev libx11-dev libxcomposite-dev libxrandr-dev libxfixes-dev binutils cmake git locales lsb-release ninja-build pkg-config python3 python3-setuptools rsync unzip wget xz-utils
# Required for testing
pulseaudio --start
#sudo apt-get install -y pipewire pipewire-pulse gstreamer1.0-pipewire libspa-0.2-bluetooth libspa-0.2-jack pipewire-audio-client-libraries
#systemctl --user daemon-reload
#systemctl --user --now enable pipewire{,-pulse}.{socket,service}
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Checkout code
uses: actions/checkout@v4
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
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-2019
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
- name: Set up Python 3.11
if: false
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Disk cleanup
if: false
run: |
Get-PSDrive
# Docker Images
docker rmi $(docker images -q -a)
# Android SDK
if ($Env:ANDROID_HOME) {
Remove-Item -Recurse -Force $Env:ANDROID_HOME -ErrorAction Ignore
}
if ($Env:ANDROID_NDK_HOME) {
Remove-Item -Recurse -Force $Env:ANDROID_NDK_HOME -ErrorAction Ignore
}
# JVM
if ($Env:JAVA_HOME_11_X64) {
Remove-Item -Recurse -Force $Env:JAVA_HOME_11_X64 -ErrorAction Ignore
}
if ($Env:JAVA_HOME_8_X64) {
Remove-Item -Recurse -Force $Env:JAVA_HOME_8_X64 -ErrorAction Ignore
}
Get-PSDrive
- name: Install required packages
run: |
choco install ninja
- 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_x86-64
runs-on: ubuntu-20.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
- name: Disk cleanup
run: |
set -x
df -h
#sudo du -h -d1 /usr/local
#sudo du -h -d1 /usr/local/share
#sudo du -h -d1 /usr/local/lib
#sudo du -h -d1 /usr/share
RMI=`docker images -q -a`
if [ -n "$RMI" ]; then
docker rmi $RMI
fi
# 4.6G
sudo rm -rf /usr/local/.ghcup
# 1.7G
sudo rm -rf /usr/share/swift
# 1.4G
sudo rm -rf /usr/share/dotnet
# 13G
sudo rm -rf /usr/local/lib/android
df -h
- name: Install required packages
run: |
sudo apt-get update
sudo apt-get install -y pulseaudio libpulse-dev libasound2-dev libdbus-1-dev libudev-dev libv4l-dev libx11-dev libxcomposite-dev libxrandr-dev libxfixes-dev binutils cmake git locales lsb-release ninja-build pkg-config python3 python3-setuptools rsync unzip wget xz-utils
# Required for testing
pulseaudio --start
#sudo apt-get install -y pipewire pipewire-pulse gstreamer1.0-pipewire libspa-0.2-bluetooth libspa-0.2-jack pipewire-audio-client-libraries
#systemctl --user daemon-reload
#systemctl --user --now enable pipewire{,-pulse}.{socket,service}
- name: Create Release # Create the release only once on Linux
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
- name: Install required packages
run: |
brew install ninja
# Required for macos-13
pip install setuptools
# Required for macos-14
brew install python-setuptools
- name: Select Xcode version
run: sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer
- 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 }}