update bundle properties [skip-ci] #251
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: Release | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Cache Gradle | |
| uses: burrunan/gradle-cache-action@v1 | |
| - name: Build | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} | |
| run: ./gradlew build clean | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "lts/*" | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Import GPG key | |
| uses: crazy-max/ghaction-import-gpg@v6 | |
| with: | |
| gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| fingerprint: ${{ env.GPG_FINGERPRINT }} | |
| - name: Release | |
| id: semantic_release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GIT_TOKEN}} | |
| run: npm exec semantic-release | |
| # output=$(npm exec semantic-release) | |
| # version=$(echo "$output" | grep -oP '(?<=Published version: )\d+\.\d+\.\d+') | |
| # echo "::set-output name=version::$version" | |
| # | |
| # - name: Update Bundle | |
| # if: startsWith(github.ref, 'refs/heads/main') # Safer condition | |
| # run: | | |
| # version=${{ steps.semantic_release.outputs.version }} | |
| # patches_asset_url="https://github.com/indrastorms/Dropped-Patches/releases/latest/download/patches-${version}.rvp" | |
| # signature_download_url="https://github.com/indrastorms/Dropped-Patches/releases/latest/download/patches-${version}.rvp.asc" | |
| # | |
| # info_dict=$(cat <<EOF | |
| # { | |
| # "created_at": "$(date -u +"%Y-%m-%dT%H:%M:%SZ")", | |
| # "description": "Release version ${version}", | |
| # "download_url": "${patches_asset_url}", | |
| # "signature_download_url": "${signature_download_url}", | |
| # "version": "${version}" | |
| # } | |
| # EOF | |
| # ) | |
| # | |
| # echo "bundle_file=dropped-patches-bundle.json" >> $GITHUB_ENV | |
| # echo "$info_dict" > "${{ env.bundle_file }}" | |
| # echo "Latest release information saved to ${{ env.bundle_file }}" | |
| # | |
| # git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| # git config --local user.name "github-actions[bot]" | |
| # git add ${{ env.bundle_file }} | |
| # git commit -m "update ${{ env.bundle_file }} [skip ci]" | |
| # | |
| # - name: Push changes | |
| # if: startsWith(github.ref, 'refs/heads/main') # Ensure this matches the main branch condition | |
| # uses: ad-m/github-push-action@master | |
| # with: | |
| # github_token: ${{ secrets.GIT_TOKEN }} | |
| # branch: main |