SQLite3MC update PR for v2.2.5 (SQLite 3.51.0) #52
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: update-sqlite3mc | |
| run-name: SQLite3MC update PR for ${{ inputs.version }} (SQLite ${{ inputs.sqlite_version }}) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'SQLite3MultipleCiphers version (prefixed with "v")' | |
| required: true | |
| sqlite_release_year: | |
| description: 'SQLite release year' | |
| default: '2025' | |
| required: true | |
| sqlite_version: | |
| description: 'SQLite version' | |
| required: true | |
| sqlite_version_enc: | |
| description: 'SQLite version (encoded)' | |
| required: true | |
| jobs: | |
| download-and-update: | |
| name: Download and update SQLite3MultipleCiphers | |
| runs-on: ubuntu-latest | |
| env: | |
| ENV_VERSION: ${{ github.event.inputs.version }} | |
| ENV_SQLITE_RELEASE_YEAR: ${{ github.event.inputs.sqlite_release_year }} | |
| ENV_SQLITE_VERSION: ${{ github.event.inputs.sqlite_version }} | |
| ENV_SQLITE_VERSION_ENC: ${{ github.event.inputs.sqlite_version_enc }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Create new update branch | |
| run: git checkout -b sqlite3mc-update-${{ env.ENV_VERSION }} | |
| - name: Update update-sqlite3mc script | |
| run: | | |
| sed -Ei "s/YEAR=\"[0-9]+\"/YEAR=\"${{ env.ENV_SQLITE_RELEASE_YEAR }}\"/g" ./deps/update-sqlite3mc.sh | |
| sed -Ei "s/VERSION=\"[0-9]+\"/VERSION=\"${{ env.ENV_SQLITE_VERSION_ENC }}\"/g" ./deps/update-sqlite3mc.sh | |
| sed -Ei "s/SQLITE3MC_VERSION=\"v[0-9]+.[0-9]+.[0-9]+\"/SQLITE3MC_VERSION=\"${{ env.ENV_VERSION }}\"/g" ./deps/update-sqlite3mc.sh | |
| - name: Download, build and package SQLite and SQLite3MC | |
| run: npm run update-sqlite3mc | |
| - name: Push update branch | |
| uses: stefanzweifel/git-auto-commit-action@v6 | |
| with: | |
| commit_message: 'Update `SQLite3MultipleCiphers` to `${{ env.ENV_VERSION }}` (SQLite `${{ env.ENV_SQLITE_VERSION }}`)' | |
| branch: sqlite3mc-update-${{ env.ENV_VERSION }} | |
| - name: Create new PR | |
| uses: repo-sync/pull-request@v2 | |
| with: | |
| github_token: ${{ secrets.ACTIONS_REPO_ACCESS }} | |
| source_branch: sqlite3mc-update-${{ env.ENV_VERSION }} | |
| pr_title: 'Update `SQLite3MultipleCiphers` to `${{ env.ENV_VERSION }}` (SQLite `${{ env.ENV_SQLITE_VERSION }}`)' | |
| pr_body: 'This is an automated pull request, updating `SQLite3MultipleCiphers` version to `${{ env.ENV_VERSION }}` with SQLite `${{ env.ENV_SQLITE_VERSION }}`.' |