Skip to content

Bump quinn-proto from 0.11.13 to 0.11.14 in the cargo group across 1 directory #72

Bump quinn-proto from 0.11.13 to 0.11.14 in the cargo group across 1 directory

Bump quinn-proto from 0.11.13 to 0.11.14 in the cargo group across 1 directory #72

Workflow file for this run

name: Build GitHub releases
# This is triggered by merging a PR from a branch named release-*. This workflow builds and publishes the release artifacts to
# GitHub. Then it changes the version to *-SNAPSHOT in various Java-related files.
on:
pull_request:
types:
- closed
jobs:
release:
if: github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release-')
runs-on: ubuntu-latest
needs:
- build-java
- build-cpp
steps:
- uses: actions/checkout@v6
with:
# base_ref will typically be main. We'll need to commit a change to that branch and push it.
ref: ${{ github.base_ref }}
# If we use the default GITHUB_TOKEN then CI won't run after we push our changes. This WORKFLOW_PAT is a personal
# access token with "repo" permissions.
token: ${{ secrets.WORKFLOW_PAT }}
- name: Decrypt PGP key
uses: IronCoreLabs/ironhide-actions/decrypt@v3
with:
keys: ${{ secrets.IRONHIDE_KEYS }}
input: .github/signing-key.asc.iron
- name: Import PGP key
run: gpg --batch --import .github/signing-key.asc
- name: Configure git
run: |
git config --local user.email ops@ironcorelabs.com
git config --local user.name "Leeroy Travis"
- name: Calculate versions from head_ref
id: version
run: |
CURRENT=$(basename ${{ github.head_ref }})
NAME=$(echo ${CURRENT} | sed 's/release-//')
NUMBER=$(echo ${NAME} | sed -E -e 's/[^0-9.]+/./g' -e 's/\.+/./g' -e 's/^\.//' -e 's/\.$//')
NEXT=$(echo ${NUMBER} | awk -F. -v OFS=. '{$NF++;print}')
echo "tag=${NAME}" >> "$GITHUB_OUTPUT"
echo "next=${NEXT}" >> "$GITHUB_OUTPUT"
- name: Create release tag
run: |
git tag ${{ steps.version.outputs.tag }}
git push origin ${{ steps.version.outputs.tag }}
- uses: actions/create-release@v1
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.tag }}
release_name: Version ${{ steps.version.outputs.tag }}
- name: Download java release artifacts from ubuntu-latest
uses: actions/download-artifact@v6
with:
name: release-ubuntu-latest
path: release/ubuntu-latest
- name: Delete artifact
uses: geekyeggo/delete-artifact@v5
with:
name: release-ubuntu-latest
failOnError: false
- name: Sign java artifact for ubuntu-latest
run: |
gpg --batch --detach-sign -a release/ubuntu-latest/libironoxide_java.so
gpg --batch --verify release/ubuntu-latest/libironoxide_java.so.asc release/ubuntu-latest/libironoxide_java.so
- name: Upload java lib for ubuntu-latest
run: gh release upload ${{ steps.version.outputs.tag }} release/ubuntu-latest/libironoxide_java.so release/ubuntu-latest/libironoxide_java.so.asc --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download java release artifacts from macos-15
uses: actions/download-artifact@v6
with:
name: release-macos-15
path: release/macos-15
- name: Delete artifact
uses: geekyeggo/delete-artifact@v5
with:
name: release-macos-15
failOnError: false
- name: Sign java artifact for macos-15
run: |
gpg --batch --detach-sign -a release/macos-15/libironoxide_java.dylib
gpg --batch --verify release/macos-15/libironoxide_java.dylib.asc release/macos-15/libironoxide_java.dylib
- name: Upload java lib for macos-15
run: gh release upload ${{ steps.version.outputs.tag }} release/macos-15/libironoxide_java.dylib release/macos-15/libironoxide_java.dylib.asc --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download C++ release artifacts from ubuntu-latest
uses: actions/download-artifact@v6
with:
name: release-cpp-ubuntu-latest
path: release/cpp-ubuntu-latest
- name: Delete artifact
uses: geekyeggo/delete-artifact@v5
with:
name: release-cpp-ubuntu-latest
failOnError: false
- name: Sign C++ artifact for ubuntu-latest
run: |
gpg --batch --detach-sign -a release/cpp-ubuntu-latest/ironoxide-cpp-linux-x86_64.tar.gz
gpg --batch --verify release/cpp-ubuntu-latest/ironoxide-cpp-linux-x86_64.tar.gz.asc release/cpp-ubuntu-latest/ironoxide-cpp-linux-x86_64.tar.gz
- name: Upload C++ lib for ubuntu-latest
run: gh release upload ${{ steps.version.outputs.tag }} release/cpp-ubuntu-latest/ironoxide-cpp-linux-x86_64.tar.gz release/cpp-ubuntu-latest/ironoxide-cpp-linux-x86_64.tar.gz.asc --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download C++ release artifacts from macos-15
uses: actions/download-artifact@v6
with:
name: release-cpp-macos-15
path: release/cpp-macos-15
- name: Delete artifact
uses: geekyeggo/delete-artifact@v5
with:
name: release-cpp-macos-15
failOnError: false
- name: Sign C++ artifact for macos-15
run: |
gpg --batch --detach-sign -a release/cpp-macos-15/ironoxide-cpp-macos-aarch64.tar.gz
gpg --batch --verify release/cpp-macos-15/ironoxide-cpp-macos-aarch64.tar.gz.asc release/cpp-macos-15/ironoxide-cpp-macos-aarch64.tar.gz
- name: Upload C++ lib for macos-15
run: gh release upload ${{ steps.version.outputs.tag }} release/cpp-macos-15/ironoxide-cpp-macos-aarch64.tar.gz release/cpp-macos-15/ironoxide-cpp-macos-aarch64.tar.gz.asc --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Increment to next -SNAPSHOT version for Java.
run: |
rm -rf release
.github/set-versions.sh -j ${{ steps.version.outputs.next }}-SNAPSHOT
- run: git commit -m "Set next -SNAPSHOT version for Java."
- run: git push
build-java:
if: github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release-')
strategy:
matrix:
os: [ubuntu-latest, macos-15]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: coursier/setup-action@v2
with:
jvm: 21
apps: sbt
# Not installing llvm for Mac because https://stackoverflow.com/a/35753922/107357
- name: Install llvm (ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install -y llvm
- uses: IronCoreLabs/rust-toolchain@v1
- uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Upload artifacts for ubuntu-latest
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v6
with:
name: release-ubuntu-latest
path: target/release/libironoxide_java.so
- name: Upload artifacts for macos-15
if: startsWith(matrix.os, 'macos')
uses: actions/upload-artifact@v6
with:
name: release-macos-15
path: target/release/libironoxide_java.dylib
build-cpp:
if: github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release-')
strategy:
matrix:
include:
- os: ubuntu-latest
shared-lib: libironoxide.so
static-lib: libironoxide.a
artifact-name: release-cpp-ubuntu-latest
tar-name: ironoxide-cpp-linux-x86_64.tar.gz
- os: macos-15
shared-lib: libironoxide.dylib
static-lib: libironoxide.a
artifact-name: release-cpp-macos-15
tar-name: ironoxide-cpp-macos-aarch64.tar.gz
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: IronCoreLabs/rust-toolchain@v1
- name: Build C++ release
run: cargo build --release -p ironoxide-cpp
- name: Package C++ release
run: |
mkdir -p pkg/include/ironoxide pkg/lib/pkgconfig
cp cpp/generated/sdk/*.hpp cpp/generated/sdk/*.h pkg/include/ironoxide/
cp target/release/${{ matrix.shared-lib }} pkg/lib/
cp target/release/${{ matrix.static-lib }} pkg/lib/
sed 's|%PREFIX%|/usr/local|g' cpp/ironoxide.pc.in > pkg/lib/pkgconfig/ironoxide.pc
tar -czf ${{ matrix.tar-name }} -C pkg .
- uses: actions/upload-artifact@v6
with:
name: ${{ matrix.artifact-name }}
path: ${{ matrix.tar-name }}