Gradle initScript release #4
This file contains 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: Gradle initScript release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
type: string | |
required: true | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
update-reference: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Generate reference script with version | |
run: ./gradlew promote -Pversion=${{ inputs.version }} | |
env: | |
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }} | |
- name: Commit & push changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: '[bot] Update develocity-injection reference script' | |
tagging_message: '${{ inputs.version }}' | |
release: | |
needs: update-reference | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'gradle/actions' | |
path: actions | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Copy reference script | |
run: cp reference/develocity-injection.init.gradle actions/sources/src/resources/init-scripts/gradle-actions.inject-develocity.init.gradle | |
# If there are no changes, this action will not create a pull request | |
- name: Create or update pull request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
branch: bot/develocity-injection-init-script-update | |
commit-message: 'Update develocity-injection init script' | |
title: 'Update develocity-injection init script' | |
path: actions | |
token: ${{ secrets.GH_TOKEN }} |