Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWI-5874 Update Deploy Workflow #152

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 32 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ jobs:
fi

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: feature/openapi-generator-sdk

- name: Set up Apache Maven Central
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
java-version: 21
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
Expand All @@ -63,8 +63,20 @@ jobs:
- name: Set Maven Project Version
run: mvn versions:set -DnewVersion=$RELEASE_VERSION

- name: Build Package and Test
env:
JAVA_VERSION: 21
RUNNER_OS: ubuntu-latest
OPERATING_SYSTEM: ubuntu -latest
DISTRIBUTION: adopt
run: |
mvn -B package --file pom.xml -DskipTests
npm install -g @stoplight/prism-cli
prism mock ./bandwidth.yml & (sleep 3; mvn test -Punit-tests)
shell: bash

- name: Publish to Apache Maven Central
run: mvn deploy
run: mvn deploy -DskipTests
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
Expand Down Expand Up @@ -103,13 +115,13 @@ jobs:
BW_NUMBER_PROVIDER: ${{ secrets.BW_NUMBER_PROVIDER }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Apache Maven Central
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
java-version: 21
server-id: 'ossrh'
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
Expand All @@ -122,15 +134,27 @@ jobs:
- name: Set Maven Project Version
run: mvn versions:set -DnewVersion=$RELEASE_VERSION

- name: Build Package and Test
env:
JAVA_VERSION: 21
RUNNER_OS: ubuntu-latest
OPERATING_SYSTEM: ubuntu -latest
DISTRIBUTION: adopt
run: |
mvn -B package --file pom.xml -DskipTests
npm install -g @stoplight/prism-cli
prism mock ./bandwidth.yml & (sleep 3; mvn test -Punit-tests)
shell: bash

- name: Publish to Apache Maven Central
run: mvn deploy
run: mvn deploy -DskipTests
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

- name: Notify Slack
uses: Bandwidth/build-notify-slack-action@v1.0.0
uses: Bandwidth/build-notify-slack-action@v2.0.0
if: always()
with:
job-status: ${{ job.status }}
Expand Down