Add yangPathIgnore
setting
#138
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: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
mdlint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DavidAnson/markdownlint-cli2-action@v15 | |
with: | |
globs: | | |
**/*.md | |
!build/**/*.md | |
!bin/**/*.md | |
!RIFT.ware/**/*.md | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 11 | |
distribution: adopt | |
- name: Evaluate version | |
run: | | |
echo "PROJECT_VERSION=$(./gradlew --no-daemon properties -q | grep "version:" | awk '{print $2}')" >> $GITHUB_ENV | |
echo "HAVE_SNAPSHOT=$(./gradlew --no-daemon properties -q | grep "version:" | awk '{print $2}' | grep SNAPSHOT | wc -l)" >> $GITHUB_ENV | |
working-directory: yang-lsp | |
- name: Run Gradle build, execute tests and copy zip | |
run: ./gradlew --no-daemon build copyDist | |
working-directory: yang-lsp | |
- name: Check Publishing conditions | |
run: echo "env.HAVE_SNAPSHOT=$HAVE_SNAPSHOT github.repository=${{github.repository}} github.ref=${{github.ref}}" | |
- name: Gradle Publish Snapshots | |
if: env.HAVE_SNAPSHOT == 1 && github.repository == 'typefox/yang-lsp' && github.ref == 'refs/heads/master' | |
run: ./gradlew --no-daemon publish | |
working-directory: yang-lsp | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
files: yang-lsp/**/test-results/**/*.xml | |
- name: Archive yang-language-server | |
uses: actions/upload-artifact@v3 | |
with: | |
name: yang-language-server_${{ env.PROJECT_VERSION }} | |
path: | | |
yang-lsp/build/yang-language-server_[0-9]*.zip | |
- name: Archive yang-language-server_diagram-extension | |
uses: actions/upload-artifact@v3 | |
with: | |
name: yang-language-server_diagram-extension_${{ env.PROJECT_VERSION }} | |
path: | | |
yang-lsp/build/yang-language-server_diagram-extension*.zip | |
- name: Archive yang-tool_cli | |
uses: actions/upload-artifact@v3 | |
with: | |
name: yang-tool_cli_${{ env.PROJECT_VERSION }} | |
path: | | |
yang-lsp/build/yang-tool_cli_*.zip |