Skip to content

ADD:test summary

ADD:test summary #8

Workflow file for this run

name: Deploy Application
on:
push:
branches:
- master
jobs:
build:
name: publish tag
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Generate Git Tag
id: generate_tag
run: |
VERSION_PREFIX="v"
VERSION_MAJOR_MINOR="5.0"
VERSION_PATCH=$(git tag --list "${VERSION_PREFIX}${VERSION_MAJOR_MINOR}.*" --sort=-version:refname | head -n 1 | grep -oE '[0-9]+$')
if [ -z "$VERSION_PATCH" ]; then
VERSION_PATCH=0
else
VERSION_PATCH=$((VERSION_PATCH + 1))
fi
NEW_TAG="${VERSION_PREFIX}${VERSION_MAJOR_MINOR}.${VERSION_PATCH}"
echo "Generated new tag: $NEW_TAG"
echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV
- name: Push Git Tag
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git tag $NEW_TAG
git push origin $NEW_TAG
- name: read formula config file
run: |
url="https://github.com/wswenyue/aklog/archive/${NEW_TAG}.tar.gz"
sha256=$(wget -O aklog.tar.gz ${url} && shasum -a 256 aklog.tar.gz | cut -d ' ' -f 1)
echo "url==>${url}" >> $GITHUB_STEP_SUMMARY
echo "sha256==>${sha256}" >> $GITHUB_STEP_SUMMARY
rm -rf ./aklog.tar.gz
en_url=`echo $url |sed 's#\/#\\\/#g'`
echo "========1=======" >> $GITHUB_STEP_SUMMARY
sed -e "s/#_url_#/${en_url}/g; s/#_sha256_#/${sha256}/g" .github/data/aklog.rb |tee .github/data/aklog.rb
echo "========2=======" >> $GITHUB_STEP_SUMMARY
cat .github/data/aklog.rb >> $GITHUB_STEP_SUMMARY
echo "========3=======" >> $GITHUB_STEP_SUMMARY
# content=$(cat .github/data/aklog.rb)
# echo $content >> $GITHUB_STEP_SUMMARY