Skip to content

Tagging 1.3.21

Tagging 1.3.21 #56

Workflow file for this run

name: Tagging
run-name: Tagging ${{ github.event.inputs.semver }}
on:
workflow_dispatch:
inputs:
semver:
description: "Semantic version of release"
required: true
jobs:
tagging:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Update package.json
env:
RELEASE_TAG: ${{ github.event.inputs.semver }}
run: |
tmp=$(mktemp)
jq '.version = "'${RELEASE_TAG}'"' haechi.face.unity.sdk/package.json > $tmp && mv $tmp haechi.face.unity.sdk/package.json
- name: Update SdkInfo.cs file
env:
RELEASE_TAG: ${{ github.event.inputs.semver }}
run: |
FILE_PATH=haechi.face.unity.sdk/Runtime/Client/SdkInfo.cs
if [ -f "$FILE_PATH" ]; then
CONTENT="namespace haechi.face.unity.sdk.Runtime.Utils
{
public class SdkInfo
{
public static readonly string UNITY_SDK_TYPE = \"unity\";
public static readonly string UNITY_SDK_VERSION = \"${RELEASE_TAG}\";
}
}"
echo "$CONTENT" > $FILE_PATH
else
echo "No file exists"
fi
- name: Set up Golang
uses: actions/setup-go@v3
with:
go-version: 'stable'
- name: Install
run: |
go install github.com/git-chglog/git-chglog/cmd/git-chglog@latest
- name: Generate Change Log & Release Note
env:
RELEASE_TAG: ${{ github.event.inputs.semver }}
run: |
git tag ${RELEASE_TAG}
git-chglog ${RELEASE_TAG} > CHANGELOG.${RELEASE_TAG}.md
if [[ -f CHANGELOG.md ]]; then
cat CHANGELOG.md >> CHANGELOG.${RELEASE_TAG}.md
fi
mv CHANGELOG.${RELEASE_TAG}.md CHANGELOG.md
cp CHANGELOG.md haechi.face.unity.sdk/
git-chglog ${RELEASE_TAG} > RELEASE_NOTE.md
- name: Zip android files
run: |
cd android-dependency-generator/Assets/Plugins/Android
zip -r android-libraries.zip *.jar *.aar
cd ../../../../
- name: Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.HAECHI_GITHUB_PAT }}
with:
tag_name: ${{ github.event.inputs.semver }}
release_name: ${{ github.event.inputs.semver }}
draft: false
prerelease: false
body_path: ./RELEASE_NOTE.md
files: |
android-dependency-generator/Assets/Plugins/Android/android-libraries.zip
- name: Commit Change Log
run: |
git config --local user.email "haechi@github.com"
git config --local user.name "haechilabs"
git add CHANGELOG.md haechi.face.unity.sdk
git commit -m "chore: update CHANGELOG.md"
- name: Push Change Log
uses: ad-m/github-push-action@master
with:
branch: "releases/${{ github.event.inputs.semver }}"