优化 gid 匹配,优化 uid.log 显示 #34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: debug | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths-ignore: | |
| - "docs/**" | |
| - "README.md" | |
| - "CHANGELOG.md" | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| fetch-depth: 0 | |
| - name: Update Module.prop | |
| run: | | |
| dos2unix module.prop || true | |
| VERSION=$(grep -oP 'version=\K[^ ]+' module.prop | tr -d '\r') | |
| sed -i "s/$VERSION/$VERSION($(git log --oneline -n 1 | awk '{print $1}'))/g" module.prop | |
| sed -i "s/versionCode=.*/versionCode=$(date +%Y%m%d)/g" module.prop | |
| - name: Get Version | |
| id: get_version | |
| run: | | |
| VERSION=$(grep -oP 'version=\K[^ ]+' module.prop | tr -d '\r') | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Generate Asset | |
| run: | | |
| sudo mkdir -p /box | |
| sudo cp -r --parents $(find ./ -type f ! -path './.git/*' ! -name 'CHANGELOG.md' ! -name 'update.json' ! -name 'build.sh' ! -path './.github/*' ! -path './docs/*') /box/ | |
| - name: Upload Debug Asset => (box_${{ steps.get_version.outputs.version }}) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "box_${{ steps.get_version.outputs.version }}" | |
| path: /box/ | |
| upload: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| fetch-depth: 0 | |
| - name: run build | |
| run: | | |
| chmod +x build.sh | |
| ./build.sh | |