Skip to content

Commit

Permalink
Update GitHub workflows and environment secrets
Browse files Browse the repository at this point in the history
The workflows for publish-release, build, and publish-snapshot have been updated for better task management and usage of gradle build action v3. The environment secrets were also modified in workflows for better organization and clarity in accessing GitHub secrets. Overall, these changes enhance the efficiency of our CI/CD process.
  • Loading branch information
Lamberto Basti committed May 22, 2024
1 parent 159b683 commit 0c02552
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
java-version: '17'
distribution: 'zulu'
cache: gradle
- uses: gradle/gradle-build-action@v2
- uses: gradle/gradle-build-action@v3
- name: Run :buildShadowPlugin task
run: ./gradlew :plugin:buildShadowPlugin
env:
Expand Down
35 changes: 18 additions & 17 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ name: Publish to Marketplace
on:
release:
types: [ published ]
branches: [ releases/241 ]

jobs:
publish:
name: Publish Package Search to Marketplace
runs-on: ubuntu-latest
env:
MARKETPLACE_TOKEN: ${{ secrets.MARKETPLACE_TOKEN }}
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
RUN_NUMBER: ${{ github.run_number }}
RUN_ATTEMPT: ${{ github.run_attempt }}
CHANGE_NOTES: ${{ github.event.release.body }}
KMP: true
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -17,21 +29,10 @@ jobs:
with:
java-version: '17'
distribution: 'zulu'
- uses: gradle/gradle-build-action@v2
- name: Run :publishShadowPluginToMarketplace task
run: ./gradlew publishAllPublicationsToSpaceRepository :plugin:publishPluginToMarketplace
env:
MARKETPLACE_TOKEN: ${{ secrets.MARKETPLACE_TOKEN }}
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
CHANGE_NOTES: ${{ github.event.release.body }}
- name: Run :publishStablePluginToTBE task
- uses: gradle/gradle-build-action@v3
- name: Publish libraries
run: ./gradlew publishAllPublicationsToSpaceRepository
- name: Publish release plugin to TBE
run: ./gradlew :plugin:publishReleasePluginToTBE
env:
KMP: true
TOOLBOX_ENTERPRISE_TOKEN: ${{ secrets.TOOLBOX_ENTERPRISE_TOKEN }}
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
CHANGE_NOTES: ${{ github.event.release.body }}
- name: Publish plugin to Marketplace
run: ./gradlew :plugin:publishPluginToMarketplace
27 changes: 15 additions & 12 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ jobs:
publish:
name: Publish Package Search Snapshot to TBE
runs-on: ubuntu-latest
continue-on-error: true
env:
TOOLBOX_ENTERPRISE_TOKEN: ${{ secrets.TOOLBOX_ENTERPRISE_TOKEN }}
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
RUN_NUMBER: ${{ github.run_number }}
RUN_ATTEMPT: ${{ github.run_attempt }}
KMP: true
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -19,15 +30,7 @@ jobs:
distribution: 'zulu'
cache: gradle
- uses: gradle/gradle-build-action@v2
- name: Run :publishShadowPlugin task
run: ./gradlew :plugin:publishSnapshotPluginToTBE publishAllPublicationsToSpaceRepository
env:
TOOLBOX_ENTERPRISE_TOKEN: ${{ secrets.TOOLBOX_ENTERPRISE_TOKEN }}
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }}
SPACE_INTELLIJ_NIGHTLIES_TOKEN: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_TOKEN }}
SPACE_INTELLIJ_NIGHTLIES_USERNAME: ${{ secrets.SPACE_INTELLIJ_NIGHTLIES_USERNAME }}
SPACE_PACKAGE_SEARCH_TOKEN: ${{ secrets.SPACE_PACKAGE_SEARCH_TOKEN }}
SPACE_PACKAGE_SEARCH_USERNAME: ${{ secrets.SPACE_PACKAGE_SEARCH_USERNAME }}
RUN_NUMBER: ${{ github.run_number }}
RUN_ATTEMPT: ${{ github.run_attempt }}
KMP: true
- name: Publish libraries
run: ./gradlew publishAllPublicationsToSpaceRepository
- name: Publish plugin snapshot to TBE
run: ./gradlew :plugin:publishSnapshotPluginToTBE

0 comments on commit 0c02552

Please sign in to comment.