v3.17.15 #60
Workflow file for this run
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: "release-actions" | |
on: | |
release: | |
types: [ released ] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 | |
with: | |
egress-policy: audit | |
- name: Generate a token | |
id: generate_token | |
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 | |
with: | |
app_id: ${{ secrets.APP_ID_ADMIN_GITHUB }} | |
private_key: ${{ secrets.APP_PRIVATE_KEY_ADMIN_GITHUB }} | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
token: ${{ steps.generate_token.outputs.token }} | |
- name: Set up JDK 11 | |
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV | |
- name: Upgrade README.md | |
run: sed -i 's/version \".*\"/version "${{ env.RELEASE_VERSION }}"/g' README.md | |
- name: Upgrade README.md | |
run: sed -i 's/version \\".*\\"/version \\"${{ env.RELEASE_VERSION }}\\"/g' README.md | |
- name: Upgrade Gradle.properties | |
run: sed -i 's/version=.*/version=${{ env.RELEASE_VERSION }}/g' gradle.properties | |
- name: Upgrade Constants.java | |
run: sed -i 's/PLUGIN_VERSION = .*/PLUGIN_VERSION = "${{ env.RELEASE_VERSION }}";/g' src/main/java/co/com/bancolombia/Constants.java | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Generate Changelog | |
uses: heinrichreimer/github-changelog-generator-action@e60b5a2bd9fcd88dadf6345ff8327863fb8b490f # v2.4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
pullRequests: true | |
prWoLabels: true | |
issues: true | |
issuesWoLabels: true | |
stripGeneratorNotice: true | |
- name: Save version | |
uses: github-actions-x/commit@722d56b8968bf00ced78407bbe2ead81062d8baa # v2.9 | |
with: | |
github-token: ${{ steps.generate_token.outputs.token }} | |
push-branch: "master" | |
commit-message: 'upgrade version to ${{ env.RELEASE_VERSION }} version [skip ci]' | |
force-add: "true" | |
force-push: "true" | |
files: CHANGELOG.md README.md gradle.properties src/main/java/co/com/bancolombia/Constants.java | |
name: Release Bot | |
email: [email protected] | |
- name: Set Analytics Endpoint | |
run: sed -i "s/ENDPOINT = \"\"/ENDPOINT = \"$ANALYTICS_ENDPOINT\"/g" src/main/java/co/com/bancolombia/utils/analytics/AnalyticsExporter.java | |
env: | |
ANALYTICS_ENDPOINT: ${{ secrets.ANALYTICS_ENDPOINT }} | |
- name: Publish plugin in gradle plugins | |
run: ./gradlew publishPlugins -Pgradle.publish.key=${{ secrets.KEY_GRADLE }} -Pgradle.publish.secret=${{ secrets.SECRET_GRADLE }} | |
- name: Publish plugin in github packages | |
run: ./gradlew publish --info | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
library: | |
runs-on: ubuntu-latest | |
needs: release | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
ref: 'master' | |
- name: Set up JDK 11 | |
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
# publish as library in maven | |
- name: Confirm gradle.properties | |
run: cat gradle.properties | |
- name: Prepare gpg key | |
run: | | |
mkdir -p ~/.gradle/ | |
echo "${{secrets.SIGNING_KEY_FILE}}" | base64 -d > ~/.gradle/secring.gpg | |
- name: Publish Libraries | |
run: ./gradlew publishToSonatype --info closeAndReleaseSonatypeStagingRepository -Psigning.keyId=${{ secrets.SIGNING_KEY_ID }} -Psigning.password=${{ secrets.SIGNING_KEY_PASSWORD }} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) | |
env: | |
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.MAVEN_USERNAME }} | |
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.MAVEN_PASSWORD }} |