4verif grammar #669
This file contains hidden or 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
| # (c) https://github.com/MontiCore/monticore | |
| name: Gradle | |
| concurrency: # run this test workflow only once per branch | |
| group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: # run this test pipeline on every push | |
| pull_request: # and pull request | |
| repository_dispatch: # and on request of upstream projects | |
| types: [ trigger_after_upstream_deploy ] | |
| env: | |
| GRADLE_VERSION: 7.4 # Gradle version used | |
| GRADLE_CLI_OPTS: "-Pci --build-cache " # CLI options passed to Gradle | |
| permissions: | |
| contents: read # This action may run somewhat unsafe code | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout project sources | |
| uses: actions/checkout@v4 | |
| - name: Gradle build | |
| uses: gradle/actions/setup-gradle@v3 | |
| with: | |
| gradle-version: ${{env.GRADLE_VERSION}} | |
| arguments: build ${{env.GRADLE_CLI_OPTS}} | |
| -PgithubUser=${{env.GITHUB_ACTOR}} | |
| -PgithubToken=${{secrets.GITHUB_TOKEN}} | |
| deploy: | |
| permissions: | |
| packages: write | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: | |
| github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release') | |
| steps: | |
| - name: Checkout project sources | |
| uses: actions/checkout@v4 | |
| - run: curl -fsSL https://deb.nodesource.com/setup_18.x | bash - | |
| - run: sudo apt-get install -y nodejs | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| gradle-version: ${{env.GRADLE_VERSION}} | |
| - name: Gradle Publish | |
| run: gradle build publish ${{env.GRADLE_CLI_OPTS}} | |
| -PnexusPassword=${{ secrets.SE_NEXUS_PASSWORD }} | |
| -PnexusUser=${{ secrets.SE_NEXUS_USER }} | |
| -PgithubUser=${{env.GITHUB_ACTOR}} | |
| -PgithubToken=${{secrets.GITHUB_TOKEN}} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |