Skip to content

Commit

Permalink
Update GH Actions (#295)
Browse files Browse the repository at this point in the history
Motivation:
Need to update GH Actions before deprecation.

Modifications:
Updates setup-java, upload-artifact, checkout to v4

Results:
Up to date
  • Loading branch information
jchrys authored Jan 1, 2025
1 parent 673aac8 commit 07bae62
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/cd-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
prepare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/checkout@v4
- name: Set Up Java 8
uses: actions/setup-java@v3

uses: actions/setup-java@v4
with:
distribution: 'temurin' # gh runner local caches lts temurins
java-version: '8'
distribution: "temurin" # gh runner local caches lts temurins
java-version: "8"

- name: Setup Git Configs
run: |
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
run: ./.github/scripts/ensure_prepared.sh

- name: Upload workspace
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: prepare-workspace
path: ${{ github.workspace }}
Expand All @@ -77,7 +77,7 @@ jobs:
needs: prepare
steps:
- name: Download workspace
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4
with:
name: prepare-workspace
path: ./prepare-workspace/
Expand All @@ -88,10 +88,10 @@ jobs:
chmod 755 ./prepare-workspace/.github/scripts/release_rollback.sh
- name: Set up Java 8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin' # gh runner local caches lts temurins
java-version: '8'
distribution: "temurin" # gh runner local caches lts temurins
java-version: "8"

- name: Setup git configs
run: |
Expand Down Expand Up @@ -123,24 +123,22 @@ jobs:
- name: Create Local Deploy Directory
run: mkdir -p ~/local-staging

- name: Prepare Internal Dependencies
working-directory: ./prepare-workspace/
run: ./mvnw -B -ntp -pl build-tools clean install -DskipTests -Dcheckstyle.skip

- name: Import GPG & Deploy Local Staging
working-directory: ./prepare-workspace/
run: |
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import
./mvnw -B -ntp -pl r2dbc-mysql clean javadoc:jar package gpg:sign org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DnexusUrl=https://s01.oss.sonatype.org -DserverId=ossrh-staging -DaltStagingDirectory=/home/runner/local-staging -DskipRemoteStaging=true -DskipTests=true -Dcheckstyle.skip -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" -Dgpg.keyname="${{ secrets.GPG_KEY_NAME }}"
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import
./mvnw -B -ntp -pl r2dbc-mysql clean javadoc:jar package gpg:sign org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DnexusUrl=https://s01.oss.sonatype.org -DserverId=ossrh-staging -DaltStagingDirectory=/home/runner/local-staging -DskipRemoteStaging=true -DskipTests=true -Dcheckstyle.skip -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" -Dgpg.keyname="${{ secrets.GPG_KEY_NAME }}"
- name: Deploy Local Staged Artifacts
working-directory: ./prepare-workspace/
run: ./mvnw -B -ntp -pl r2dbc-mysql --file pom.xml org.sonatype.plugins:nexus-staging-maven-plugin:deploy-staged -DnexusUrl=https://s01.oss.sonatype.org -DserverId=ossrh-staging -DaltStagingDirectory=/home/runner/local-staging -DskipStagingRepositoryClose=true -Dcheckstyle.skip


- name: Rollback Release
working-directory: ./prepare-workspace/
if: ${{ failure() }}
run: ./.github/scripts/release_rollback.sh trunk

0 comments on commit 07bae62

Please sign in to comment.