Release #36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
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: 7204 | |
WEBRTC_CHECKOUT_FOLDER: webrtc | |
WEBRTC_INSTALL_FOLDER: webrtc/build | |
jobs: | |
prepare-release: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- name: linux_x86-64 | |
runs-on: ubuntu-22.04 | |
runs-on: ${{ matrix.platform.runs-on }} | |
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 }} | |
# Get the release version from the release.properties file | |
RELEASE_VERSION=$(grep "project.rel.dev.onvoid.webrtc\\\:webrtc-java=" release.properties | cut -d'=' -f2) | |
echo "Extracted release version from release.properties: $RELEASE_VERSION" | |
# Update versions.js file | |
echo "Updating versions.js with release version: $RELEASE_VERSION and development version: ${{ github.event.inputs.developmentVersion }}" | |
sed -i "s/VERSION: '.*'/VERSION: '$RELEASE_VERSION'/g" docs/assets/versions.js | |
sed -i "s/VERSION_SNAPSHOT: '.*'/VERSION_SNAPSHOT: '${{ github.event.inputs.developmentVersion }}'/g" docs/assets/versions.js | |
# Add the updated file to the existing commit | |
git add docs/assets/versions.js | |
git commit --amend --no-edit | |
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-14 | |
- 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-arm64 | |
name: Maven build - Apple Silicon | |
if: matrix.platform.name == 'macos_arm64' | |
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 }} | |
- id: maven-build-x86_64 | |
name: Maven build - Intel | |
if: matrix.platform.name == 'macos_x86-64' | |
uses: ./.github/actions/release-macos-x86_64 | |
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 }} |