Skip to content

Release

Release #77

Workflow file for this run

name: Release
on:
release:
types: [created]
jobs:
get-release:
runs-on: ubuntu-latest
steps:
- name: Get Release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Dump upload url to file
run: echo '${{ steps.get_release.outputs.upload_url }}' > upload_url
- name: Upload upload_url
uses: actions/upload-artifact@v3
with:
name: upload_url
path: upload_url
build:
needs: get-release
runs-on: ubuntu-latest
steps:
- name: Download upload_url
uses: actions/download-artifact@v3
with:
name: upload_url
path: upload_url
- name: Set upload_url
run: echo "UPLOAD_URL=$(cat upload_url/upload_url)" >> $GITHUB_ENV
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
path: './build'
- name: Make packaging script executable
run: chmod +x ./build/package.sh
- uses: uraimo/run-on-arch-action@v2
name: Run commands
id: runcmd
with:
arch: aarch64
distro: ubuntu_latest
setup: |
mkdir -p "${PWD}/build"
# Mount the build directory as /build in the container
dockerRunArgs: |
--volume "${PWD}/build:/build"
#--volume "${PWD}/package:/package"
# Pass some environment variables to the container
#env: | # YAML, but pipe character is necessary
#artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }}
# Not required, but speeds up builds by storing container images in
# a GitHub package registry. Make sure there are no secrets in the disk image!
githubToken: ${{ github.token }}
install: |
apt update -q -y
apt install software-properties-common -y
add-apt-repository ppa:deadsnakes/ppa
apt-get update -q -y
apt install -y \
autoconf \
automake \
build-essential \
ca-certificates \
curl \
git \
libbz2-dev \
libc6-dev \
libffi-dev \
libgdbm-dev \
libjpeg-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libncurses5-dev \
libncursesw5-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libudev-dev \
python3.9 \
python3-pip \
openssl \
pkg-config \
sudo \
wget \
zlib1g-dev \
libcairo2-dev \
libjpeg-dev \
libpango1.0-dev \
libgif-dev \
software-properties-common \
python3-distutils
apt-get install --reinstall python3.9-distutils python3.9-dev -y
python3.9 -m pip install setuptools wheel
run: |
cd build
chmod +x package.sh
ADDON_ARCH=linux-arm64 ./package.sh
- name: List after container
run: |
ls -lh
shell: bash
- name: Upload Release Asset tgz
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: build/matter-adapter-${{ env.RELEASE_VERSION }}-linux-arm64-v3.9.tgz
- name: Upload Release Asset shasum
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: build/matter-adapter-${{ env.RELEASE_VERSION }}-linux-arm64-v3.9.tgz.sha256sum