Release: 1.7.5-rc0 #141
Workflow file for this run
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: Tagged releases | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| dry_run: | |
| description: 'Dry run (build only, no release/upload)' | |
| type: boolean | |
| default: true | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: release-${{ github.ref_name }} | |
| cancel-in-progress: false | |
| jobs: | |
| validate-tag: | |
| name: Validate tag | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Validate tag against version files | |
| run: bash tools/release/bump.sh --mode=check --expected-tag="${{ github.ref_name }}" | |
| release-github: | |
| name: Create GitHub release | |
| needs: validate-tag | |
| if: always() && (needs.validate-tag.result == 'success' || github.event_name == 'workflow_dispatch') | |
| permissions: | |
| contents: write | |
| actions: write | |
| runs-on: ubuntu-22.04 | |
| environment: foss-production | |
| steps: | |
| - name: Decode Keystore | |
| env: | |
| ENCODED_KEYSTORE: ${{ secrets.SIGNING_KEYSTORE_BASE64 }} | |
| run: | | |
| TMP_KEYSTORE_DIR_PATH="${RUNNER_TEMP}"/keystore | |
| mkdir -p "${TMP_KEYSTORE_DIR_PATH}" | |
| TMP_KEYSTORE_FILE_PATH="${TMP_KEYSTORE_DIR_PATH}"/keystore.jks | |
| echo $ENCODED_KEYSTORE | base64 -di > "${TMP_KEYSTORE_FILE_PATH}" | |
| echo "STORE_PATH=$(echo $TMP_KEYSTORE_FILE_PATH)" >> $GITHUB_ENV | |
| - name: Checkout source code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup project and build environment | |
| uses: ./.github/actions/common-setup | |
| - name: Assemble beta APK | |
| if: contains(github.ref_name, '-beta') | |
| run: ./gradlew assembleFossBeta | |
| env: | |
| VERSION: ${{ github.ref }} | |
| STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} | |
| KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
| KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
| - name: Assemble production APK | |
| if: "!contains(github.ref_name, '-beta')" | |
| run: ./gradlew assembleFossRelease | |
| env: | |
| VERSION: ${{ github.ref }} | |
| STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} | |
| KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
| KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
| - name: Create pre-release | |
| if: "contains(github.ref_name, '-beta') && !(github.event_name == 'workflow_dispatch' && inputs.dry_run)" | |
| uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda #v3.0.0 | |
| with: | |
| prerelease: true | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| generate_release_notes: true | |
| files: app/build/outputs/apk/foss/beta/eu.darken.sdmse-*.apk | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create release | |
| if: "!contains(github.ref_name, '-beta') && !(github.event_name == 'workflow_dispatch' && inputs.dry_run)" | |
| uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda #v3.0.0 | |
| with: | |
| prerelease: false | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| generate_release_notes: true | |
| files: app/build/outputs/apk/foss/release/eu.darken.sdmse-*.apk | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Trigger GitHub Pages deployment | |
| if: "!(github.event_name == 'workflow_dispatch' && inputs.dry_run)" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh workflow run pages.yml --ref main | |
| release-gplay: | |
| name: Create Google Play release | |
| needs: validate-tag | |
| if: always() && (needs.validate-tag.result == 'success' || github.event_name == 'workflow_dispatch') | |
| runs-on: ubuntu-22.04 | |
| environment: gplay-production | |
| env: | |
| BUNDLE_GEMFILE: ${{ github.workspace }}/fastlane/Gemfile | |
| steps: | |
| - name: Decode Keystore | |
| env: | |
| ENCODED_KEYSTORE: ${{ secrets.SIGNING_KEYSTORE_BASE64 }} | |
| run: | | |
| TMP_KEYSTORE_DIR_PATH="${RUNNER_TEMP}"/keystore | |
| mkdir -p "${TMP_KEYSTORE_DIR_PATH}" | |
| TMP_KEYSTORE_FILE_PATH="${TMP_KEYSTORE_DIR_PATH}"/keystore.jks | |
| echo $ENCODED_KEYSTORE | base64 -di > "${TMP_KEYSTORE_FILE_PATH}" | |
| echo "STORE_PATH=$(echo $TMP_KEYSTORE_FILE_PATH)" >> $GITHUB_ENV | |
| - name: Decode Google Play service account key | |
| env: | |
| ENCODED_SERVICE_KEY: ${{ secrets.GPLAY_SERVICE_ACCOUNT_KEY_JSON_BASE64 }} | |
| run: | | |
| TMP_SERVICEKEY_DIR="${RUNNER_TEMP}"/gplaykey | |
| mkdir -p "${TMP_SERVICEKEY_DIR}" | |
| TMP_SERVICEKEY_FILE_PATH="${TMP_SERVICEKEY_DIR}"/service_account.json | |
| echo $ENCODED_SERVICE_KEY | base64 -di > "${TMP_SERVICEKEY_FILE_PATH}" | |
| echo "SUPPLY_JSON_KEY=$(echo $TMP_SERVICEKEY_FILE_PATH)" >> $GITHUB_ENV | |
| - name: Checkout source code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup project and build environment | |
| uses: ./.github/actions/common-setup | |
| - name: Set up ruby env | |
| uses: ruby/setup-ruby@4eb9f110bac952a8b68ecf92e3b5c7a987594ba6 #v1.292.0 | |
| with: | |
| ruby-version: 3.3.6 | |
| bundler-cache: true | |
| working-directory: fastlane | |
| - name: Verify fastlane Bundler wiring | |
| run: bundle exec fastlane --version | |
| - name: Assemble beta and upload to Google Play | |
| if: "contains(github.ref_name, '-beta') && !(github.event_name == 'workflow_dispatch' && inputs.dry_run)" | |
| run: bundle exec fastlane beta | |
| env: | |
| STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} | |
| KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
| KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
| - name: Assemble production and upload to Google Play | |
| if: "!contains(github.ref_name, '-beta') && !(github.event_name == 'workflow_dispatch' && inputs.dry_run)" | |
| run: bundle exec fastlane production | |
| env: | |
| STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} | |
| KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
| KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} |