Feature: better http contexts #271
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 | |
on: | |
workflow_dispatch: | |
inputs: {} | |
push: | |
branches: [ "develop" ] | |
tags: [ "v**" ] | |
pull_request: | |
branches: [ "develop" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [ '11' ] | |
scala: [ '2.12', '2.13', '3.2' ] | |
steps: | |
- uses: 7mind/github-env@main | |
with: | |
java-version: ${{ matrix.java }} | |
- name: Build and Test | |
run: | | |
bash sbtgen.sc --js | |
bash .build.sh ${{ matrix.scala }} coverage | |
- uses: codecov/codecov-action@v3 | |
if: needs.checksecret.outputs.HAVE_SECRETS == 'true' | |
with: | |
token: ${{ secrets.TOKEN_CODECOV }} # not required for public repos but works unreliable without it | |
verbose: true # optional (default = false) | |
fail_ci_if_error: true | |
files: cobertura.xml | |
# TODO: do we need scoverage.xml? If so files: may be just omitted | |
# files: cobertura.xml,scoverage.xml | |
# flags: unittests | |
checksecret: | |
runs-on: ubuntu-latest | |
outputs: | |
HAVE_SECRETS: ${{ steps.checksecret_job.outputs.HAVE_SECRETS }} | |
steps: | |
- id: checksecret_job | |
env: | |
OPENSSL_IV: ${{ secrets.OPENSSL_IV }} | |
OPENSSL_KEY: ${{ secrets.OPENSSL_KEY }} | |
run: | | |
echo "HAVE_SECRETS=${{ env.OPENSSL_IV != '' && env.OPENSSL_KEY != '' }}" >> $GITHUB_OUTPUT | |
publish-alien: | |
runs-on: ubuntu-latest | |
needs: [ 'checksecret' ] | |
if: needs.checksecret.outputs.HAVE_SECRETS == 'true' | |
steps: | |
- uses: 7mind/github-env@main | |
with: | |
java-version: 11 | |
- name: Publish alien artifacts | |
env: | |
OPENSSL_IV: ${{ secrets.OPENSSL_IV }} | |
OPENSSL_KEY: ${{ secrets.OPENSSL_KEY }} | |
TOKEN_NUGET: ${{ secrets.TOKEN_NUGET }} | |
TOKEN_NPM: ${{ secrets.TOKEN_NPM }} | |
run: | | |
bash .build.sh 2.12 secrets publishIDL | |
publish-artifacts: | |
runs-on: ubuntu-latest | |
needs: [ 'build', 'checksecret' ] | |
if: needs.checksecret.outputs.HAVE_SECRETS == 'true' | |
strategy: | |
matrix: | |
java: [ '11' ] | |
scala: [ '2.12', '2.13', '3.2' ] | |
steps: | |
- uses: 7mind/github-env@main | |
with: | |
java-version: ${{ matrix.java }} | |
- name: Build and Publish to Sonatype | |
env: | |
OPENSSL_IV: ${{ secrets.OPENSSL_IV }} | |
OPENSSL_KEY: ${{ secrets.OPENSSL_KEY }} | |
run: | | |
bash sbtgen.sc --js | |
bash .build.sh ${{ matrix.scala }} secrets publishScala | |
all-good: | |
runs-on: ubuntu-latest | |
needs: [ 'build', 'publish-alien', 'publish-artifacts' ] | |
steps: | |
- run: 'echo "No build required"' |