Skip to content

Add release body

Add release body #9

Workflow file for this run

# Run this Action on creating a new tag matching "<library>-<version>-<build>"
# e.g., foobar-1.2.3-1
name: Release
on:
push:
tags:
- '*-*-*'
jobs:
build:
outputs:
PACKAGE_NAME: ${{ steps.build-vars.outputs.PACKAGE_NAME }}
PACKAGE_VERSION: ${{ steps.build-vars.outputs.PACKAGE_VERSION }}
BUILD_NUMBER: ${{ steps.build-vars.outputs.BUILD_NUMBER }}
strategy:
matrix:
abi: ["arm64-v8a", "armeabi-v7a", "x86", "x86_64"]
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- name: Set Build Variables
id: build-vars
env:
TAG_NAME: ${{ github.ref }}
run: |
export TAG=$(basename $TAG_NAME)
echo "TAG=${TAG}"
export PACKAGE_NAME_VERSION="${TAG%-*}"
export PACKAGE_NAME="${PACKAGE_NAME_VERSION%-*}"
export PACKAGE_VERSION="${PACKAGE_NAME_VERSION#*-}"
export BUILD_NUMBER="${TAG#*-*-}"
echo "PACKAGE_NAME=${PACKAGE_NAME}" | tee -a ${GITHUB_OUTPUT}
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" | tee -a ${GITHUB_OUTPUT}
echo "BUILD_NUMBER=${BUILD_NUMBER}" | tee -a ${GITHUB_OUTPUT}
- name: Build
run: |
./build.sh \
${{ steps.build-vars.outputs.PACKAGE_NAME }} \
${{ steps.build-vars.outputs.PACKAGE_VERSION }} \
${{ steps.build-vars.outputs.BUILD_NUMBER }} \
${{ matrix.abi }}
- uses: actions/[email protected]
with:
name: dist-${{ matrix.abi }}
path: ${{ steps.build-vars.outputs.PACKAGE_NAME }}/dist
if-no-files-found: error
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
pattern: dist-*
path: dist
merge-multiple: true
- uses: ncipollo/[email protected]
with:
name: ${{ needs.build.outputs.PACKAGE_NAME }} ${{ needs.build.outputs.PACKAGE_VERSION }}-${{ needs.build.outputs.BUILD_NUMBER }}
body: |
${{ needs.build.outputs.PACKAGE_NAME }} ${{ needs.build.outputs.PACKAGE_VERSION }} (build ${{ needs.build.outputs.BUILD_NUMBER }})
artifacts: "dist/*"