diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index 9dc7a8f..18b663d 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -17,10 +17,20 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Get Version + - name: Get tags + id: get_tags + run: | + echo "tag=$(grep -oP 'version=\K[^ ]+' module.prop)" >> "$GITHUB_OUTPUT" + echo "date=$(date +%Y%m%d)" >> "$GITHUB_OUTPUT" + + - name: update module.prop + run: | + sed -i "s/version=.*/version=${{ steps.get_tags.outputs.tag }}_$(date +%Y%m%d_%H%M)_debug/g" module.prop + sed -i "s/versionCode=.*/versionCode=${{ steps.get_tags.outputs.date }}/g" module.prop + + - name: get version id: get_version run: | - sed -i "s/v[0-9]\+\.[0-9]\+\.[0-9]\+/&_$(date +%Y%m%d_%H%M)_debug/g" module.prop echo "version=$(grep -oP 'version=\K[^ ]+' module.prop)" >> "$GITHUB_OUTPUT" - name: Generate Asset @@ -43,9 +53,8 @@ jobs: - uses: actions/checkout@v3 - name: Get Version and Build - id: get_version run: | - sed -i "s/v[0-9]\+\.[0-9]\+\.[0-9]\+/&_$(date +%Y%m%d_%H%M)_debug/g" module.prop + sed -i "s/${{ steps.get_tags.outputs.tags }}/&_$(date +%Y%m%d_%H%M)_debug/g" module.prop sh build.sh - name: Release diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99a2dc3..139f60f 100755 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: id: get_version run: | echo "date=$(date +%Y%m%d)" >> "$GITHUB_OUTPUT" - + - name: Update update.json and module.prop run: | echo '{