diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a940692..8d62cec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -140,12 +140,30 @@ jobs: gh release delete "$VER" --yes 2>/dev/null || true RELEASE=$(ls zips/*Release*.zip | head -1) DEBUG=$(ls zips/*Debug*.zip | head -1) + cp "$RELEASE" zips/TEESimulator-RS-Release.zip + cp "$DEBUG" zips/TEESimulator-RS-Debug.zip gh release create "$VER" \ --title "$VER" \ --latest \ --notes-file /tmp/notes.md \ "$RELEASE" \ - "$DEBUG" + "$DEBUG" \ + zips/TEESimulator-RS-Release.zip \ + zips/TEESimulator-RS-Debug.zip env: VER: ${{ steps.ver.outputs.version }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Bump update.json versionCode + run: | + COUNT=$(git rev-list HEAD --count) + CURRENT=$(jq -r '.versionCode' module/update.json) + if [ "$COUNT" != "$CURRENT" ]; then + jq ".versionCode = $COUNT" module/update.json > /tmp/update.json + mv /tmp/update.json module/update.json + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add module/update.json + git commit -m "chore(release): bump versionCode to $COUNT [skip ci]" + git push origin HEAD:main + fi