build: fix building protoc-gen-doc #98
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: Build and test for the pull request | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
cache: 'maven' | |
server-id: ossrh | |
server-username: OSSRH_JIRA_USERNAME | |
server-password: OSSRH_JIRA_PASSWORD | |
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} | |
gpg-passphrase: OSSRH_GPG_SECRET_KEY_PASSWORD | |
- name: Set up go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.17.3' | |
- name: Install protoc-gen-doc | |
run: go install github.com/pseudomuto/protoc-gen-doc/cmd/[email protected] | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
- name: Setup semantic-release | |
run: | | |
yarn global add @conveyal/[email protected] semantic-release@15 | |
echo "$(yarn global bin)" >> $GITHUB_PATH | |
- name: Build with Maven | |
run: mvn -B package | |
- name: Deploy SNAPSHOT version | |
run: mvn -B -DskipTests deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OSSRH_JIRA_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }} | |
OSSRH_JIRA_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }} | |
OSSRH_GPG_SECRET_KEY_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | |
- name: Dry Release | |
# maven-semantic-release requires "maven-settings.xml" in the workspace directory | |
run: | | |
mv ~/.m2/settings.xml maven-settings.xml | |
semantic-release --dry-run --branch master --use-conveyal-workflow --skip-maven-deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |