fix(retrofit): remove all references to com.squareup.okhttp (#1210) #330
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 | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
- "v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+" | |
env: | |
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx2g -Xms2g | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: git fetch --prune --unshallow | |
# Given a tag, determine what branch we are on, so we can bump dependencies in the correct branch | |
- name: Get Branch | |
run: | | |
BRANCHES=$(git branch -r --contains ${{ github.ref }}) | |
echo "BRANCHES is '${BRANCHES}'" | |
# Check for no branches explicitly...Otherwise echo adds a newline so wc thinks there's | |
# one branch. And echo -n makes it appears that there's one less branch than there | |
# actually is. | |
if [ -z "$BRANCHES" ]; then | |
echo "exactly one branch required to release kork, but there are none" | |
exit 1 | |
fi | |
NUM_BRANCHES=$(($(echo "$BRANCHES" | wc -l))) | |
echo "NUM_BRANCHES is '${NUM_BRANCHES}'" | |
if [ $NUM_BRANCHES -ne 1 ]; then | |
echo "exactly one branch required to release kork, but there are $NUM_BRANCHES ($BRANCHES)" | |
exit 1 | |
fi | |
echo "exactly one branch ($BRANCHES)" | |
echo BRANCH=$BRANCHES >> $GITHUB_ENV | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: | | |
11 | |
17 | |
distribution: 'zulu' | |
cache: 'gradle' | |
- name: Assemble release info | |
id: release_info | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
. .github/workflows/release_info.sh ${{ github.event.repository.full_name }} | |
echo CHANGELOG=$(echo -e "${CHANGELOG}") >> $GITHUB_OUTPUT | |
echo SKIP_RELEASE="${SKIP_RELEASE}" >> $GITHUB_OUTPUT | |
echo IS_CANDIDATE="${IS_CANDIDATE}" >> $GITHUB_OUTPUT | |
echo RELEASE_VERSION="${RELEASE_VERSION}" >> $GITHUB_OUTPUT | |
- name: Release build | |
env: | |
ORG_GRADLE_PROJECT_version: ${{ steps.release_info.outputs.RELEASE_VERSION }} | |
ORG_GRADLE_PROJECT_nexusPublishEnabled: true | |
ORG_GRADLE_PROJECT_nexusUsername: ${{ secrets.NEXUS_USERNAME }} | |
ORG_GRADLE_PROJECT_nexusPassword: ${{ secrets.NEXUS_PASSWORD }} | |
ORG_GRADLE_PROJECT_nexusPgpSigningKey: ${{ secrets.NEXUS_PGP_SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_nexusPgpSigningPassword: ${{ secrets.NEXUS_PGP_SIGNING_PASSWORD }} | |
run: | | |
./gradlew -PenableCrossCompilerPlugin=true --info publishToNexus closeAndReleaseNexusStagingRepository | |
- name: Create release | |
if: steps.release_info.outputs.SKIP_RELEASE == 'false' | |
uses: softprops/action-gh-release@v2 | |
with: | |
body: | | |
${{ steps.release_info.outputs.CHANGELOG }} | |
draft: false | |
name: ${{ github.event.repository.name }} ${{ github.ref_name }} | |
prerelease: ${{ steps.release_info.outputs.IS_CANDIDATE }} | |
tag_name: ${{ github.ref }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Pause before dependency bump | |
run: sleep 600 | |
- name: Trigger dependency bump workflow | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.SPINNAKER_GITHUB_TOKEN }} | |
event-type: bump-dependencies | |
client-payload: '{"ref": "${{ github.ref }}", "branch": "${{ env.BRANCH}}"}' |