forked from bufbuild/protoc-gen-validate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bufbuild:main' into main
- Loading branch information
Showing
68 changed files
with
1,455 additions
and
311 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Add issues and PRs to project | ||
|
||
on: | ||
issues: | ||
types: | ||
- opened | ||
- reopened | ||
- transferred | ||
pull_request_target: | ||
types: | ||
- opened | ||
- reopened | ||
issue_comment: | ||
types: | ||
- created | ||
|
||
jobs: | ||
call-workflow-add-to-project: | ||
name: Call workflow to add issue to project | ||
uses: bufbuild/base-workflows/.github/workflows/add-to-project.yaml@main | ||
secrets: inherit |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,16 +12,18 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
SONATYPE_USER: ${{secrets.BUF_SONATYPE_USER}} | ||
SONATYPE_PASSWORD: ${{secrets.BUF_SONATYPE_PASSWORD}} | ||
SONATYPE_USER: ${{secrets.SONATYPE_USER}} | ||
SONATYPE_PASSWORD: ${{secrets.SONATYPE_PASSWORD}} | ||
GPG_KEY_NAME: ${{secrets.GPG_KEY_NAME}} | ||
GPG_PASSPHRASE: ${{secrets.GPG_PASSPHRASE}} | ||
MAVEN_OPTS: "--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED" | ||
REF_NAME: ${{ github.ref_name }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 'stable' | ||
- name: Set VERSION variable from tag | ||
run: | | ||
VERSION=${{ env.REF_NAME }} | ||
|
@@ -41,32 +43,32 @@ jobs: | |
echo $GPG_KEY | base64 --decode > signing-key | ||
gpg --passphrase $GPG_PASSPHRASE --batch --import signing-key | ||
shred signing-key | ||
- name: Configure GIT | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "envoy-bot" | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'maven' | ||
server-id: sonatype-nexus-snapshots | ||
server-id: ossrh | ||
server-username: ${ env.SONATYPE_USER } | ||
server-password: ${ env.SONATYPE_PASSWORD } | ||
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} | ||
gpg-passphrase: ${ env.GPG_PASSPHRASE } | ||
|
||
- name: Update version in pom | ||
working-directory: ${{ github.workspace }}/java | ||
run: mvn -B versions:set -DnewVersion=${{ env.VERSION }} -DgenerateBackupPoms=false | ||
run: ./mvnw -B versions:set -DnewVersion=${{ env.VERSION }} -DgenerateBackupPoms=false | ||
|
||
- name: Publish to Maven Packages Apache Maven | ||
working-directory: ${{ github.workspace }}/java | ||
run: | | ||
mvn -B -s settings.xml clean deploy \ | ||
./mvnw -B -s settings.xml clean deploy \ | ||
-Darguments="-s settings.xml" \ | ||
-DreleaseVersion=${{ env.VERSION }} \ | ||
-DdevelopmentVersion=${{ env.VERSION }}-SNAPSHOT \ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created | ||
## For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path | ||
|
||
name: Maven Manual Deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
ref: | ||
description: "Git ref to release" | ||
required: true | ||
version: | ||
description: "Maven version to release (without 'v' prefix)" | ||
required: true | ||
deployArgs: | ||
description: "Additional Maven deploy arguments (e.g. '--debug -DautoReleaseAfterClose=false')" | ||
required: false | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
SONATYPE_USER: ${{secrets.SONATYPE_USER}} | ||
SONATYPE_PASSWORD: ${{secrets.SONATYPE_PASSWORD}} | ||
GPG_KEY_NAME: ${{secrets.GPG_KEY_NAME}} | ||
GPG_PASSPHRASE: ${{secrets.GPG_PASSPHRASE}} | ||
MAVEN_OPTS: "--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED" | ||
REF_NAME: ${{ inputs.ref }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 'stable' | ||
- name: Set VERSION variable from tag | ||
run: | | ||
echo "VERSION=${{ inputs.VERSION }}" >> $GITHUB_ENV | ||
- name: 'Configure GPG signing' | ||
env: | ||
GPG_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
run: | | ||
# https://github.com/keybase/keybase-issues/issues/2798 | ||
export GPG_TTY=$(tty) | ||
# Import gpg keys and warm the passphrase to avoid the gpg | ||
# passphrase prompt when initating a deploy | ||
# `--pinentry-mode=loopback` could be needed to ensure we | ||
# suppress the gpg prompt | ||
echo $GPG_KEY | base64 --decode > signing-key | ||
gpg --passphrase $GPG_PASSPHRASE --batch --import signing-key | ||
shred signing-key | ||
- name: Configure GIT | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "envoy-bot" | ||
- name: Set up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'maven' | ||
server-id: ossrh | ||
server-username: ${ env.SONATYPE_USER } | ||
server-password: ${ env.SONATYPE_PASSWORD } | ||
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} | ||
gpg-passphrase: ${ env.GPG_PASSPHRASE } | ||
|
||
- name: Update version in pom | ||
working-directory: ${{ github.workspace }}/java | ||
run: ./mvnw -B versions:set -DnewVersion=${{ env.VERSION }} -DgenerateBackupPoms=false | ||
|
||
- name: Publish to Maven Packages Apache Maven | ||
working-directory: ${{ github.workspace }}/java | ||
run: | | ||
./mvnw -B -s settings.xml ${{ inputs.deployArgs }} clean deploy \ | ||
-Darguments="-s settings.xml" \ | ||
-DreleaseVersion=${{ env.VERSION }} \ | ||
-DdevelopmentVersion=${{ env.VERSION }}-SNAPSHOT \ | ||
-DscmCommentPrefix="java release: " | ||
env: | ||
MAVEN_USERNAME: ${{ env.SONATYPE_USER }} | ||
MAVEN_CENTRAL_TOKEN: ${{ env.SONATYPE_PASSWORD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
linters: | ||
enable: | ||
- gci | ||
- gocritic | ||
- gofumpt | ||
- govet | ||
- misspell | ||
- unused | ||
|
||
linters-settings: | ||
gci: | ||
sections: | ||
- standard | ||
- default | ||
- prefix(github.com/envoyproxy) | ||
govet: | ||
check-shadowing: true | ||
# Settings per analyzer. | ||
settings: | ||
shadow: | ||
# Whether to be strict about shadowing; can be noisy. | ||
strict: true | ||
enable: | ||
- shadow | ||
|
||
run: | ||
timeout: 5m |
Oops, something went wrong.