Skip to content
Open
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
19 changes: 14 additions & 5 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@ on:
pull_request_target:
types: [ opened, edited, synchronize, reopened ]

permissions:
contents: read
pull-requests: read

jobs:
validate:
name: Validate title
runs-on: ubuntu-latest
runs-on: ubuntu-x64
steps:
- uses: amannn/action-semantic-pull-request@v4
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: twilio/sdk-actions/semantic-pr-title@09631bfa50f14d276170d45bc4f49a80da201cc6 # main @ 09631bf — sdk-actions#10; repin to the v1.1.0 tag once cut
with:
types: chore docs fix feat test misc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
types: |
chore
docs
fix
feat
misc
test
75 changes: 41 additions & 34 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ on:
jobs:
test:
name: Test
runs-on: ubuntu-latest
runs-on: ubuntu-x64
if: github.repository_owner == 'sendgrid'
timeout-minutes: 20
permissions:
contents: read
strategy:
matrix:
java: [ 8, 11, 17 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

- name: Set up Java
uses: actions/setup-java@v2
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
Expand All @@ -34,18 +37,23 @@ jobs:

deploy:
name: Deploy
if: success() && github.ref_type == 'tag'
if: success() && github.ref_type == 'tag' && github.repository_owner == 'sendgrid'
needs: [ test ]
runs-on: ubuntu-latest
runs-on: ubuntu-x64
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
# The release action verifies refs/tags/<tag> in the local clone.
fetch-depth: 0

- name: Set up Sonatype Maven
uses: actions/setup-java@v2
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
java-version: 8
java-version: '8'
distribution: temurin
server-id: ossrh
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
Expand All @@ -55,12 +63,11 @@ jobs:
run: make install

- name: Create GitHub Release
uses: sendgrid/dx-automator/actions/release@main
uses: twilio/sdk-actions/github-release@9b1c3222c9ffe38aadedb11c5b9f5a172b5e9951 # v1
with:
assets: java-http-client.jar
footer: '**[Maven](https://mvnrepository.com/artifact/com.sendgrid/java-http-client/${version})**'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
changelog-file: CHANGELOG.md
footer: '**[Maven](https://mvnrepository.com/artifact/com.sendgrid/java-http-client/${{ github.ref_name }})**'

- name: Publish to Maven
env:
Expand All @@ -69,25 +76,25 @@ jobs:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: mvn clean deploy -DskipTests=true -B -U -Prelease

- name: Submit metric to Datadog
uses: sendgrid/dx-automator/actions/datadog-release-metric@main
env:
DD_API_KEY: ${{ secrets.DATADOG_API_KEY }}
# - name: Submit metric to Datadog
# uses: sendgrid/dx-automator/actions/datadog-release-metric@08b601b726671445abc798ed59881766ec8fefc6 # main
# env:
# DD_API_KEY: ${{ secrets.DATADOG_API_KEY }}

notify-on-failure:
name: Slack notify on failure
if: failure() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref_type == 'tag')
needs: [ test, deploy ]
runs-on: ubuntu-latest
steps:
- uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: failure
SLACK_ICON_EMOJI: ':github:'
SLACK_MESSAGE: ${{ format('Test *{0}*, Deploy *{1}*, {2}/{3}/actions/runs/{4}', needs.test.result, needs.deploy.result, github.server_url, github.repository, github.run_id) }}
SLACK_TITLE: Action Failure - ${{ github.repository }}
SLACK_USERNAME: GitHub Actions
SLACK_MSG_AUTHOR: twilio-dx
SLACK_FOOTER: Posted automatically using GitHub Actions
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
MSG_MINIMAL: true
# notify-on-failure:
# name: Slack notify on failure
# if: failure() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref_type == 'tag')
# needs: [ test, deploy ]
# runs-on: ubuntu-x64
# steps:
# - uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # v2.3.3
# env:
# SLACK_COLOR: failure
# SLACK_ICON_EMOJI: ':github:'
# SLACK_MESSAGE: ${{ format('Test *{0}*, Deploy *{1}*, {2}/{3}/actions/runs/{4}', needs.test.result, needs.deploy.result, github.server_url, github.repository, github.run_id) }}
# SLACK_TITLE: Action Failure - ${{ github.repository }}
# SLACK_USERNAME: GitHub Actions
# SLACK_MSG_AUTHOR: twilio-dx
# SLACK_FOOTER: Posted automatically using GitHub Actions
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# MSG_MINIMAL: true
60 changes: 0 additions & 60 deletions .github/workflows/update-dependencies.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (C) 2023, Twilio SendGrid, Inc. <help@twilio.com>
Copyright (C) 2026, Twilio SendGrid, Inc. <help@twilio.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
25 changes: 14 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<groupId>com.sendgrid</groupId>
<artifactId>java-http-client</artifactId>
<packaging>jar</packaging>
Expand All @@ -20,6 +15,15 @@
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>api</id>
<name>Twilio API</name>
<email>api@twilio.com</email>
<organization>Twilio, Inc.</organization>
<organizationUrl>https://www.twilio.com</organizationUrl>
</developer>
</developers>
<scm>
<url>https://github.com/sendgrid/java-http-client</url>
<connection>scm:git:git@github.com:sendgrid/java-http-client.git</connection>
Expand All @@ -37,14 +41,13 @@
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.8.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
</configuration>
</plugin>
<plugin>
Expand Down
Loading